X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=clients%2FHP%2Fbin%2Fvicron;fp=clients%2FHP%2Fbin%2Fvicron;h=c520074a0f590c4df8f9da33db5cec927d2eaba4;hb=a8c84d2892f07a6863b68a11eb0a4a79ffd71fb5;hp=0000000000000000000000000000000000000000;hpb=95384f94f88aceeb5eef2d322210ba4a438b6512;p=clearscm.git diff --git a/clients/HP/bin/vicron b/clients/HP/bin/vicron new file mode 100644 index 0000000..c520074 --- /dev/null +++ b/clients/HP/bin/vicron @@ -0,0 +1,50 @@ +#! /bin/sh +# upate the cron entries for the user name who is running this script +# +# Get info +# +echo Updating the cron entries for `whoami` +TMP="/tmp/$$.`whoami`" +TMP2="/tmp/2.$$.`whoami`" + +crontab -l > $TMP +cp $TMP $TMP2 + +vi $TMP + +echo "Changes made:" +if diff $TMP2 $TMP +then + exit 0 +fi + +echo "Install this new crontab file for `whoami` (y or n)? \c" + +while true +do + read response + case $response in + Y | y) + crontab $TMP + echo "Done." + break + ;; + + N | n) + /bin/rm -f $TMP $TMP2 + exit 0 + ;; + Q | q) + /bin/rm -f $TMP $TMP2 + exit 0 + ;; + + *) + echo " Please specify either Y or N. (Type Q to quit.) \c" + ;; + esac +done + +/bin/rm -f $TMP $TMP2 + +exit 0