From 0a3ad6c0abd6ab9712039fddb619d7ca0bad0711 Mon Sep 17 00:00:00 2001 From: Rodolfo Date: Tue, 2 Jul 2024 16:16:49 +0800 Subject: [PATCH] Update to use the proper path --- archsetup.sh | 7 ++++--- start-setup.sh | 17 +++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/archsetup.sh b/archsetup.sh index 02f2c9a..d56fd3e 100755 --- a/archsetup.sh +++ b/archsetup.sh @@ -1,6 +1,6 @@ #!/bin/bash -scripts_PATH=$(pwd) +scripts_PATH=$1 username=$(whoami) home_PATH=/home/$username @@ -116,9 +116,10 @@ font_PATH="$home_PATH/.local/share/fonts" if [[ ! -d $font_PATH ]]; then mkdir $font_PATH fi -cd $font_PATH +mkdir $font_PATH/JetBrainsMono +cd $font_PATH/JetBrainsMono wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz -cd $font_PATH && tar -xvf JetBrainsMono.tar.xz +cd $font_PATH/JetbrainsMono && tar -xvf JetBrainsMono.tar.xz cd "" echo "" diff --git a/start-setup.sh b/start-setup.sh index 1be33f6..37c4358 100755 --- a/start-setup.sh +++ b/start-setup.sh @@ -11,18 +11,19 @@ echo " Intro " echo "===============" echo "" -# Check for Repos directory -if [[ ! -d /home/$(whoami)/Repos ]]; then - mkdir /home/$(whoami)/Repos -fi +# Set Proper Path +proper_PATH=/home/$(whoami)/Repos -script_PATH=$(pwd) +# Check for Repos directory +if [[ ! -d $proper_PATH ]]; then + mkdir $proper_PATH +fi if [[ -f /bin/apt ]]; then while true; do read -p "Are you using a Debian? (y/n)" answer if [[ "${answer,,}" == "y" ]]; then - bash /home/rodolfo/Repos/arch-automated-installer/debiansetup.sh + bash $proper_PATH/arch-automated-installer/debiansetup.sh $proper_PATH break elif [[ "${answer,,}" == "n" ]]; then echo "Use a compatible system (Debian/Arch)" @@ -44,9 +45,9 @@ elif [[ -f /bin/pacman ]]; then # Get the Repo if [[ ! -d /home/$(whoami)/Repos/arch-automated-installer ]]; then git clone https://gitea.barcelli.net/rodolfo/arch-automated-installer /home/$(whoami)/Repos/arch-automated-installer - cd /home/$(whoami)/Repos/arch-automated-installer + cd $proper_PATH/arch-automated-installer fi - bash /home/$(whoami)/Repos/arch-automated-installer/archsetup.sh + bash $proper_PATH/arch-automated-installer/archsetup.sh $proper_PATH break elif [[ "${answer,,}" == "n" ]]; then echo "Use a compatible system (Debian/Arch)"