Can someone look over the following and correct me in the probable multiple places I am wrong, please?
I created a folder in which I then created a dotpup.sh and a thingamablog.sh
The text of dotpup is below. Do I also need to start with an empty md4sum.txt file?
To create the thingamablog.pup package which will contain the thingamablog.zip md5sum.txt and dotpup.sh files I need to run
Code: Select all
#!/bin/sh
md5sum dotpup.sh thingamablog-1.0.2-0.zip > md5sum.txt
rm -f thingamablog.pup
zip -9 thingamablog.pup dotpup.sh thingamablog-1.0.2-0.zip md5sum.txt?
Code: Select all
#!/bin/sh
MSG="`which gxmessage`" || MSG=xmessage
if ! md5sum -c md5sum.txt
then
$MSG -geometry 640x160 -center -title "thingamablog Installer" "MD5SUM ERROR: thingamablog has NOT been installed"
exit 1
fi
FOO=/root/my-roxapps
[ -d $FOO ] || mkdir $FOO
if [ -d "$FOO/thingamablog" ];then
$MSG -buttons "UnInstall:21,ReInstall:22,Quit" -geometry 640x160 -center -title "thingamablog Installer" "$FOO/thingamablog is already installed"
case $? in
21)
rm -rf "$FOO/thingamablog"
$MSG -geometry 640x160 -center -title "thingamablog Installer" "thingamablog has been uninstalled"
exit
;;
22) true ;;
*) exit ;;
esac
fi
rm -rf $FOO/thingamablog/
mv tkapps/ $FOO/thingamablog/
rox $FOO &
$MSG -geometry 640x160 -center -title "thingamablog Installer" "thingamablog has been installed"