Update to use the proper path

This commit is contained in:
Rodolfo 2024-07-02 16:16:49 +08:00
parent 691f49de26
commit 0a3ad6c0ab
2 changed files with 13 additions and 11 deletions

View file

@ -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 ""

View file

@ -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)"