aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-12-02 17:23:17 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-12-02 17:23:17 +0100
commit54a5a611096f8b37148ebc49b3ba89d12d4deb00 (patch)
tree3cb45274c69d921fd5ccdcfc13c76b06d61c4043
parent5f80589a1f4920c15c4f1d0455536132ee377fe3 (diff)
downloadscripts-54a5a611096f8b37148ebc49b3ba89d12d4deb00.tar.gz
scripts-54a5a611096f8b37148ebc49b3ba89d12d4deb00.zip
First successful usage of archSetup.sh
-rwxr-xr-xarchSetup.sh49
1 files changed, 29 insertions, 20 deletions
diff --git a/archSetup.sh b/archSetup.sh
index af985ad..16b9e08 100755
--- a/archSetup.sh
+++ b/archSetup.sh
@@ -8,6 +8,9 @@ packagesFile="$HOME/repos/configs/packages.txt"
# Setup is done from the $HOME directory
cd
+# Pacman config
+sudo sed -i 's/^#Color.*$/Color\nILoveCandy/' /etc/pacman.conf
+
# Install git to get needed repos
echo "Installing git"
sudo pacman -S git
@@ -36,13 +39,13 @@ fi
cd
# Read programs to install from file
-sed -n '/^# pacman/,/^# yay/p' "$packagesFile" | sed '/^#/d' | pacman -S -
+sed -n '/^# pacman/,/^# yay/p' "$packagesFile" | sed '/^#/d' | sudo pacman -S -
# Clone specific programs sources to be compiled and installed later
cd "$HOME/repos"
-git clone "https://git.suckless.org/dmenu"
-git clone "https://github.com/muennich/sxiv"
-git clone "https://aur.archlinux.org/yay.git"
+[ ! -d "dmenu" ] && git clone "https://git.suckless.org/dmenu"
+[ ! -d "sxiv" ] && git clone "https://github.com/muennich/sxiv"
+[ ! -d "yay" ] && git clone "https://aur.archlinux.org/yay.git"
cd
# Put config files in place
@@ -56,22 +59,28 @@ cd
echo "Installing some program repos."
cd "$HOME/repos"
-cd dmenu
-make
-sudo make install
-make clean
-cd ..
-
-cd sxiv
-make
-sudo make install
-make clean
-cd ..
-
-cd yay
-makepkg -si
-cd
-echo ""
+if type dmenu; then
+ cd dmenu
+ make
+ sudo make install
+ make clean
+ cd ..
+fi
+
+if type sxiv; then
+ cd sxiv
+ make
+ sudo make install
+ make clean
+ cd ..
+fi
+
+if type yay; then
+ cd yay
+ makepkg -si
+ cd
+ echo ""
+fi
# Install programs with yay
sed -n '/^# yay/,$p' "$packagesFile" | sed '/^#/d' | yay -S -