2021-01-07 08:09:41 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SELECTED_INSTALL_DIR=$1
|
|
|
|
|
2022-07-17 18:11:57 +00:00
|
|
|
. ~/.local/opt/script_utils/parse-package-managers-params.bash
|
|
|
|
|
|
|
|
if [ "${RUN[pacman]}" = "1" ]
|
2021-01-07 08:09:41 +00:00
|
|
|
then
|
|
|
|
# Install arch packages
|
|
|
|
echo "Installing Arch packages..."
|
2022-07-17 18:12:11 +00:00
|
|
|
sudo xargs -a $SELECTED_INSTALL_DIR/pacman pacman -S --noconfirm --needed
|
2021-01-07 08:09:41 +00:00
|
|
|
|
|
|
|
echo "Installing packages from AUR using aurfetch..."
|
|
|
|
while read p; do
|
2022-05-09 13:59:26 +00:00
|
|
|
aurfetch install -q $p
|
2021-01-07 08:09:41 +00:00
|
|
|
done <$SELECTED_INSTALL_DIR/AUR
|
|
|
|
fi
|
|
|
|
|
2022-07-17 18:11:57 +00:00
|
|
|
if [ "${RUN[apt]}" = "1" ]
|
2021-01-07 08:09:41 +00:00
|
|
|
then
|
|
|
|
echo "Installing apt packages..."
|
|
|
|
sudo xargs -a $SELECTED_INSTALL_DIR/apt apt install
|
|
|
|
fi
|
|
|
|
|
2022-07-17 18:11:57 +00:00
|
|
|
if [ "${RUN[dnf]}" = "1" ]
|
|
|
|
then
|
|
|
|
echo "Installing dnf packages..."
|
|
|
|
sudo xargs -a $SELECTED_INSTALL_DIR/dnf dnf install
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${RUN[brew]}" = "1" ]
|
2021-01-07 08:09:41 +00:00
|
|
|
then
|
|
|
|
echo "Installing brew packages..."
|
|
|
|
brew bundle --file $SELECTED_INSTALL_DIR/Brewfile
|
|
|
|
fi
|
|
|
|
|
2022-07-17 18:11:57 +00:00
|
|
|
if [ "${RUN[flatpak]}" = "1" ]
|
2021-01-07 08:09:41 +00:00
|
|
|
then
|
|
|
|
echo "Installing flatpak packages..."
|
|
|
|
xargs -a $SELECTED_INSTALL_DIR/flatpak flatpak install
|
|
|
|
fi
|
|
|
|
|
2022-07-17 18:11:57 +00:00
|
|
|
if [ "${RUN[gem]}" = "1" ]
|
2021-01-07 08:09:41 +00:00
|
|
|
then
|
|
|
|
echo "Installing gems..."
|
|
|
|
while read gem; do
|
|
|
|
gem install $gem
|
|
|
|
done <$( cat $SELECTED_INSTALL_DIR/gem | awk '{print $1}')
|
|
|
|
fi
|
|
|
|
|
2022-07-17 18:11:57 +00:00
|
|
|
if [ "${RUN[pip2]}" = "1" ]
|
2021-01-07 08:09:41 +00:00
|
|
|
then
|
|
|
|
echo "Installing python2 packages..."
|
|
|
|
pip2 install -r $SELECTED_INSTALL_DIR/pip2
|
|
|
|
fi
|
|
|
|
|
2022-07-17 18:11:57 +00:00
|
|
|
if [ "${RUN[pip3]}" = "1" ]
|
2021-01-07 08:09:41 +00:00
|
|
|
then
|
|
|
|
echo "Installing python3 packages..."
|
|
|
|
pip3 install -r $SELECTED_INSTALL_DIR/pip3
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Please install npm packages manually... List of these is located in $SELECTED_INSTALL_DIR/npm"
|
|
|
|
echo "DONE!"
|