diff --git a/ArchUpdater.sh b/ArchUpdater.sh index c9f982d..42d565c 100755 --- a/ArchUpdater.sh +++ b/ArchUpdater.sh @@ -31,12 +31,12 @@ sudo flatpak update #Check if its been more than two weeks since the last rebuild of AUR -git packages -if [ ! -f ./last-git.txt ]; then +if [ ! -f $HOME/.config/ArchUpdater/last-git.txt ]; then echo "It looks like this is the first time you have run this script or you have said no to this question before. AUR -git packages should occasionally be rebuilt as generally they will build from the most current HEAD of the git project but the maintainer may not update the AUR package as frequently, to get the latest version it is recommended to run yay -S every now and then. Would you like this script to do so now? In the future you will only be prompted to do this if it has been more than 2 weeks since the previous run, as AUR packages are often built from source it can be time consuming" while true; do read -p "Would you like to update your -git aur packages? (y/n) " yn case $yn in - [Yy]* ) yay -S $gitlist; echo $(date +%s) > ./last-git.txt; break;; + [Yy]* ) yay -S $gitlist; echo $(date +%s) > $HOME/.config/ArchUpdater/last-git.txt; break;; [Nn]* ) exit;; * ) echo "Please answer yes or no.";; esac @@ -46,7 +46,7 @@ elif [ $(($(date +%s)-$( ./last-git.txt; break;; + [Yy]* ) yay -S $gitlist; echo $(date +%s) > $HOME/.config/ArchUpdater/last-git.txt; break;; [Nn]* ) exit;; * ) echo "Please answer yes or no.";; esac