Move the last-git txt file to ~/.config to make the script agnostic of where it is run from
This commit is contained in:
@@ -31,12 +31,12 @@ sudo flatpak update
|
|||||||
|
|
||||||
|
|
||||||
#Check if its been more than two weeks since the last rebuild of AUR -git packages
|
#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 <pkgname> 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"
|
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 <pkgname> 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
|
while true; do
|
||||||
read -p "Would you like to update your -git aur packages? (y/n) " yn
|
read -p "Would you like to update your -git aur packages? (y/n) " yn
|
||||||
case $yn in
|
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;;
|
[Nn]* ) exit;;
|
||||||
* ) echo "Please answer yes or no.";;
|
* ) echo "Please answer yes or no.";;
|
||||||
esac
|
esac
|
||||||
@@ -46,7 +46,7 @@ elif [ $(($(date +%s)-$(<last-git.txt))) -gt 1209600 ]; then
|
|||||||
while true; do
|
while true; do
|
||||||
read -p "Would you like to do so now? (y/n) " yn
|
read -p "Would you like to do so now? (y/n) " yn
|
||||||
case $yn in
|
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;;
|
[Nn]* ) exit;;
|
||||||
* ) echo "Please answer yes or no.";;
|
* ) echo "Please answer yes or no.";;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user