This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo -e "\033[0;31m$(figlet WARNING)\nThis script uses the internet to ping \033[1;36mwww.archlinux.org\033[1;32m" | |
timedatectl set-time "$(date -d "$(curl --head www.archlinux.org | grep Date | cut -d ' ' -f 3-6) $(sed -n '$s/:/ hours /;$s/^[A-Z]*-//;$p' /etc/localtime) minutes" +"%Y-%m-%d %H:%M:%S")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#last run: Fri 03 May 2024 08:10:25 PM IST | |
#Program to download all CTAN Latex documentation and store it locally | |
set -x #show commands | |
cd "$(dirname "$0")" #be proper directory | |
echo "#!/bin/sh | |
#last run: $(date +'%c') | |
$(tail -n +3 "$0")" > .temp #store file with new date | |
[ -d "Source" ] || mkdir Source;[ -d "Docs" ] || mkdir Docs;[ -d "Pages" ] || mkdir Pages #make directories | |
rm Docs/*;rm -rf Source/* #clean existing documentation |