Code Sample |
#!/bin/sh # # /opt/.start_gcombust - Checks to see if GCombust is already installed # and starts it up. Otherwise, install the program. # Rev 0 1/01/04 # Has this script called itself with the install argument? while [ "$1" = "install" ] do # First, download and unpack the Vector Linux GCombust binaries cd $HOME echo 'Grabbing GCombust Binaries...' wget -c http://www.ibiblio.org/pub/linux/distributions/vectorlinux/veclinux-4.0/packages/gcombust-0.1.55-i386-1.tgz tar -zxvf gcombust-0.1.55-i386-1.tgz usr/X11R6/bin/gcombust usr/X11R6/share/pixmaps/gcombust.xpm rm -rf $HOME/gcombust-0.1.55-i386-1.tgz rm -rf $HOME/install # Next, install the files and clean up mkdir /opt/gcombust cp $HOME/usr/X11R6/bin/gcombust /opt/gcombust cp $HOME/usr/X11R6/share/pixmaps/gcombust.xpm $HOME/.xtdesktop rm -rf $HOME/usr # Create Desktop Icon for GCombust echo 'table Icon' > $HOME/.xtdesktop/gcombust.lnk echo ' Type: Program' >> $HOME/.xtdesktop/gcombust.lnk echo ' Caption: GCombust' >> $HOME/.xtdesktop/gcombust.lnk echo ' Command: sh /opt/.start_gcombust' >> $HOME/.xtdesktop/gcombust.lnk echo ' Icon: .xtdesktop/gcombust.xpm' >> $HOME/.xtdesktop/gcombust.lnk echo ' X: 385' >> $HOME/.xtdesktop/gcombust.lnk echo ' Y: 98' >> $HOME/.xtdesktop/gcombust.lnk echo 'end' >> $HOME/.xtdesktop/gcombust.lnk exit done # Check to see if gcombust is already installed if test -f '/opt/gcombust/gcombust' then /opt/gcombust/gcombust & exit fi # Otherwise, run this script again in an rxvt window with the # install argument added cd $HOME rxvt -rv -T "installing GCombust..." -e sh /opt/.start_gcombust install # Restart the xtdesktop icons if needed ps -ef | grep xtdesk | grep -v grep | grep -v re_xtdesk > /tmp/startgcombust.tmp if test -s '/tmp/startgcombust.tmp' then killall -9 xtdesk >/dev/null xtdesk >/dev/null & fi rm -rf /tmp/startgcombust.tmp # Start gcombust for the first time /opt/gcombust/gcombust exit |
Code Sample |
#!/bin/sh # # /opt/.start_gcombust - Checks to see if GCombust is already installed # and starts it up. Otherwise, install the program # and install cdparanoia CD Audio ripping program. # Rev 1 1/04/04 # Has this script called itself with the install argument? while [ "$1" = "install" ] do # First, download and unpack the Vector Linux GCombust binaries cd $HOME echo 'Grabbing GCombust Binaries...' wget -c http://www.ibiblio.org/pub/linux/distributions/vectorlinux/veclinux-4.0/packages/gcombust-0.1.55-i386-1.tgz tar -zxvf gcombust-0.1.55-i386-1.tgz usr/X11R6/bin/gcombust usr/X11R6/share/pixmaps/gcombust.xpm rm -rf $HOME/gcombust-0.1.55-i386-1.tgz # Create the /opt directories if they don't already exist if [ ! -f /opt/bin ] then mkdir /opt/bin fi if [ ! -f /opt/lib ] then mkdir /opt/lib fi if [ ! -f /opt/share/pixmaps ] then mkdir -p /opt/share/pixmaps fi # Install the GCombust files cp $HOME/usr/X11R6/bin/gcombust /opt/bin cp $HOME/usr/X11R6/share/pixmaps/gcombust.xpm /opt/share/pixmaps # Download and install Slackware 9.1 cdparanoia binaries and libraries wget -c http://distro.ibiblio.org/pub/Linux/distributions/slackware/slackware-9.1/slackware/ap/cdparanoia-IIIalpha9.8-i386-1.tgz tar -zxvf cdparanoia-IIIalpha9.8-i386-1.tgz install usr/bin usr/lib/*so* rm -rf cdparanoia-IIIalpha9.8-i386-1.tgz sh $HOME/install/doinst.sh cp $HOME/usr/bin/cdparanoia /opt/bin cp -r --reply=yes $HOME/usr/lib/* /opt/lib # Clean up the leftover junk rm -rf $HOME/install $HOME/usr # Start gcombust for the first time export PATH=/opt/bin:$PATH export LD_LIBRARY_PATH=/opt/lib /opt/bin/gcombust exit done # Add the /opt/bin and /opt/lib locations to the appropriate PATHs export PATH=/opt/bin:$PATH export LD_LIBRARY_PATH=/opt/lib # Check to see if gcombust is already installed if test -f '/opt/bin/gcombust' then /opt/bin/gcombust else # Otherwise, run this script again in an rxvt window with the # install argument added cd $HOME rxvt -rv -T "installing GCombust..." -e sh /opt/.start_gcombust install fi # Create Desktop Icon for Gcombust if needed if test -f '/opt/bin/gcombust' then if [ ! -f '$HOME/.xtdesktop/gcombust.lnk' ] then cp /opt/share/pixmaps/gcombust.xpm $HOME/.xtdesktop echo 'table Icon' > $HOME/.xtdesktop/gcombust.lnk echo ' Type: Program' >> $HOME/.xtdesktop/gcombust.lnk echo ' Caption: GCombust' >> $HOME/.xtdesktop/gcombust.lnk echo ' Command: sh /opt/.start_gcombust' >> $HOME/.xtdesktop/gcombust.lnk echo ' Icon: .xtdesktop/gcombust.xpm' >> $HOME/.xtdesktop/gcombust.lnk echo ' X: 385' >> $HOME/.xtdesktop/gcombust.lnk echo ' Y: 98' >> $HOME/.xtdesktop/gcombust.lnk echo 'end' >> $HOME/.xtdesktop/gcombust.lnk # Restart the xtdesktop icons if needed ps -ef | grep xtdesk | grep -v grep | grep -v re_xtdesk > /tmp/startgcombust.tmp if test -s '/tmp/startgcombust.tmp' then killall -9 xtdesk >/dev/null xtdesk >/dev/null & fi rm -rf /tmp/startgcombust.tmp fi fi exit |