# Defined in /tmp/fish.xZCDu4/bw-check.fish @ line 2 function bw-check set root /home/anton/projects/bavaria-wifi set fname all.min-(date +%Y-%m-%d-%H-%M-%S).js set js (curl -s https://hotspot.vodafone.de/bayern/dist/js/all.min.js) set sha (echo -n "$js" | sha1sum | string split " ")[1] if ! cat $root/shasums | grep $sha echo "$js" > $root/scripts/$fname echo -e "Found new script! sha: $sha.\nSaved in $root/scripts/$fname" echo "$sha" (date +%Y-%m-%d-%H-%M-%S) >> $root/shasums else echo "nothing new" end end