From 066d8343ee6c1d5fa5689bf13ccdf07a7d76431a Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Tue, 4 Oct 2022 02:10:42 +0200 Subject: Installed Ficus. --- archSetup.sh | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'archSetup.sh') diff --git a/archSetup.sh b/archSetup.sh index 3d9e1ff..1148b59 100755 --- a/archSetup.sh +++ b/archSetup.sh @@ -21,7 +21,7 @@ prompt() { echo "$1" shift read answer - echo "$answer" | grep -E -q '^[yY]' && "$@" + echo "$answer" | grep -E -q '^[yY]' && eval "$@" } # Initialization @@ -37,12 +37,12 @@ mkdir -p "$HOME/downloads/videos" mkdir -p "$HOME/downloads/audios" mkdir -p "$HOME/media/images/screenshots" mkdir -p "$HOME/media/images/wallpapers/shufs/current" +mkdir "$HOME/logs" mkdir "$HOME/repos" # Connect to server sshKey="$HOME/.ssh/id_rsa_$(hostnamectl hostname)ForXyz" -ssh-keygen -f "$sshKey" || exit 1 -ssh-copy-id -i "$sshKey" "$server" || exit 1 +ssh-keygen -f "$sshKey" && ssh-copy-id -i "$sshKey" "$server" # Install git to get needed repos if ! type git; then @@ -96,8 +96,8 @@ echo "Heavy packages are:" getPackageGroup heavy prompt "Install heavy packages? [y/N]" installPackageGroup heavy prompt "Install audio packages? [y/N]" installAudio="y" -prompt "Install graphic packages? [y/N]" installGraphic="y" [ -z "$installAudio" ] || installPackageGroup audio +prompt "Install graphic packages? [y/N]" installGraphic="y" [ -z "$installGraphic" ] || installPackageGroup graphic # Clone specific programs sources to be compiled and installed later @@ -112,6 +112,10 @@ cd "$HOME/repos" echo "Putting config files in place" ( cd "$HOME/repos/configs/stow" +if [ -f "$HOME/.bashrc" ]; then + prompt "Remove .bashrc? If it is the installation default it will prevent stow from loading configs. [y/N]" \ + rm "$HOME/.bashrc" +fi stow -t "$HOME" calcurse stow -t "$HOME" neofetch stow -t "$HOME" newsboat @@ -147,10 +151,13 @@ echo "Installing some program repos." cd "$HOME/repos" if ! type dmenu; then ( + echo "Installing dmenu." + echo cd dmenu git remote add xyz "${server}:~/repos/remotes/dmenu" - git checkout -b taamas - git pull xyz taamas + git checkout xyz/taamas + git switch -c taamas + git branch --set-upstream-to=xyz/taamas taamas make sudo make install make clean @@ -159,6 +166,8 @@ fi if ! type sxiv; then ( + echo "Installing sxiv." + echo cd sxiv make sudo make install @@ -168,6 +177,8 @@ fi if ! type yay; then ( + echo "Installing yay." + echo cd yay makepkg -si ) @@ -176,15 +187,17 @@ echo "" ) # Install programs with yay -getPackageGroup "yay" | yay -S - +prompt "Install yay packages? [y/N]" getPackageGroup 'yay' '|' yay -S - # Mainpage -( -cd "$HOME/repos" -git clone "https://git.taamas.xyz/Taamas/mainpage" -cp -r "mainpage" "$HOME/.mainpage" -rm -rf "$HOME/.mainpage/.git" +if [ ! -d "$HOME/.mainpage" ]; then + ( + cd "$HOME/repos" + git clone "https://git.taamas.xyz/Taamas/mainpage" + cp -r "mainpage" "$HOME/.mainpage" + rm -rf "$HOME/.mainpage/.git" ) +fi # Remove default .bash_profile as it avoids .profile execution if [ -f ".bash_profile" ]; then -- cgit v1.2.1