--- install-air-1.2.5.orig 2004-08-12 02:16:24.000000000 +0930 +++ install-air-1.2.5 2004-09-12 19:29:45.843365848 +0930 @@ -4,15 +4,16 @@ PERLTK_VER="804.027" TK_SOURCE="http://www.cpan.org/modules/by-module/Tk" TK_FILE='Tk-804.027.tar.gz' -TEMP_DIR="/tmp" -TK_DIR=$TEMP_DIR/Tk-804.027 -ICON_DIR="/usr/local/share/air/bitmaps" -LOG_DIR="/usr/local/share/air/logs" -INSTALL_LOG="/tmp/air-install.log" +TEMP_DIR="${T}" +TK_DIR=${TEMP_DIR}/Tk-804.027 +INSTALL_DIR="/usr" +ICON_DIR="${INSTALL_DIR}/share/air/bitmaps" +LOG_DIR="${INSTALL_DIR}/share/air/logs" +INSTALL_LOG="${TEMP_DIR}/air-install.log" echo "Install Log for AIR Version $VERSION" > $INSTALL_LOG date >> $INSTALL_LOG -cat /etc/redhat-release >> $INSTALL_LOG +cat /etc/gentoo-release >> $INSTALL_LOG cat /proc/cpuinfo >> $INSTALL_LOG free >> $INSTALL_LOG @@ -76,13 +77,13 @@ fi echo "Perl/Tk version: $TK_VER" >> $INSTALL_LOG -echo "" -echo "If you are ready to proceed with the installation/upgrade," -echo "press ENTER." -echo "" -echo "To cancel, hit Control-C." - -read foo < /dev/tty +#echo "" +#echo "If you are ready to proceed with the installation/upgrade," +#echo "press ENTER." +#echo "" +#echo "To cancel, hit Control-C." +# +#read foo < /dev/tty if [ $UPGRADE = "no" ] ; then echo "Attempting to get the latest version of Perl/Tk..." @@ -90,7 +91,7 @@ echo "Need to download Perl/Tk:" >> $INSTALL_LOG echo "decoding snarf..." >> $INSTALL_LOG -sed 's/^X//' << 'SHAR_EOF' | uudecode -o /tmp/snarf.gz 2>> $INSTALL_LOG +sed 's/^X//' << 'SHAR_EOF' | uudecode -o ${TEMP_DIR}/snarf.gz 2>> $INSTALL_LOG begin 755 snarf.gz M'XL("-BW"SL``W-N87)F`.U\?WQ35;;O29N64%(2H$B1XAQ'RP^AOZCR&RS$ M%!`*(:&MOY@2VK2GM4U"<@*M6(RFG4L:,],WUW&\]SKO,N./R\SUSCAW'`=' @@ -347,7 +348,7 @@ fi echo "decoding air-counter..." >> $INSTALL_LOG -sed 's/^X//' << 'SHAR2_EOF' | uudecode -o /tmp/air-counter 2>> $INSTALL_LOG +sed 's/^X//' << 'SHAR2_EOF' | uudecode -o ${TEMP_DIR}/air-counter 2>> $INSTALL_LOG begin 755 air-counter M(R$O=7-R+V)I;B]P97)L"B,J*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ @@ -399,7 +400,7 @@ SHAR2_EOF echo "decoding air..." >> $INSTALL_LOG -sed 's/^X//' << 'SHAR3_EOF' | uudecode -o /tmp/air 2>> $INSTALL_LOG +sed 's/^X//' << 'SHAR3_EOF' | uudecode -o ${TEMP_DIR}/air 2>> $INSTALL_LOG begin 755 air M(R$O=7-R+V)I;B]P97)L(`HC*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ @@ -2042,7 +2043,7 @@ SHAR3_EOF echo "decoding icons..." >> $INSTALL_LOG -sed 's/^X//' << 'SHAR4_EOF' | uudecode -o /tmp/air-icons.tar.gz 2>> $INSTALL_LOG +sed 's/^X//' << 'SHAR4_EOF' | uudecode -o ${TEMP_DIR}/air-icons.tar.gz 2>> $INSTALL_LOG begin 664 air-icons.tar.gz M'XL("*3?P3T``V%I> $INSTALL_LOG -sed 's/^X//' << 'SHAR5_EOF' | uudecode -o /usr/local/bin/tailer 2>> $INSTALL_LOG +sed 's/^X//' << 'SHAR5_EOF' | uudecode -o ${INSTALL_DIR}/bin/tailer 2>> $INSTALL_LOG begin 755 tailer M(R$O8FEN+W-H"B,J*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BH*(R`@ @@ -2371,7 +2372,7 @@ SHAR5_EOF echo "decodiing split..." >> $INSTALL_LOG -sed 's/^X//' << 'SHAR6_EOF' | uudecode -o /tmp/split.gz 2>> $INSTALL_LOG +sed 's/^X//' << 'SHAR6_EOF' | uudecode -o ${TEMP_DIR}/split.gz 2>> $INSTALL_LOG begin 755 split.gz M'XL("/.S$T$``W-P;&ET`.U\#WQ4Q;7PW;"$)03O@HN-)UM;%ZKKVJU)87VT7]*:Z4)*`2" @@ -2630,12 +2631,12 @@ end SHAR6_EOF if [ $UPGRADE = "no" ] ; then - # unzip /tmp/snarf.gz - /bin/gunzip /tmp/snarf.gz + # unzip ${TEMP_DIR}/snarf.gz + /bin/gunzip ${TEMP_DIR}/snarf.gz # Use snarf to "snarf" the Perl/Tk package (It has a progress display) - /tmp/snarf -n $TK_SOURCE/$TK_FILE $TEMP_DIR/$TK_FILE + ${TEMP_DIR}/snarf -n $TK_SOURCE/$TK_FILE $TEMP_DIR/$TK_FILE if [ $? -ne 0 ] ; then @@ -2650,7 +2651,7 @@ echo "If the installer failed with some other error message," echo "please email steve@unixgurus.com for assistance." echo "" - rm -f /tmp/snarf* + rm -f ${TEMP_DIR}/snarf* exit 1 else echo "Download of Perl/Tk successful." | tee -a $INSTALL_LOG @@ -2690,27 +2691,27 @@ # install air-counter echo "Unpacking and installing air-counter..." | tee -a $INSTALL_LOG -mv -f /tmp/air-counter /usr/local/bin/air-counter 2>> $INSTALL_LOG -chmod +x /usr/local/bin/air-counter 2>> $INSTALL_LOG -rm -f /tmp/air-counter 2>> $INSTALL_LOG +mv -f ${TEMP_DIR}/air-counter ${INSTALL_DIR}/bin/air-counter 2>> $INSTALL_LOG +chmod +x ${INSTALL_DIR}/bin/air-counter 2>> $INSTALL_LOG +rm -f ${TEMP_DIR}/air-counter 2>> $INSTALL_LOG echo "Install of air-counter is complete." | tee -a $INSTALL_LOG echo "" # unzip and install icons echo "Unpacking and installing icons..." | tee -a $INSTALL_LOG -/bin/tar -C $TEMP_DIR -zxf /tmp/air-icons.tar.gz 2>> $INSTALL_LOG -mv -f /tmp/*.xbm $ICON_DIR 2>> $INSTALL_LOG -mv -f /tmp/*.gif $ICON_DIR 2>> $INSTALL_LOG -rm -f /tmp/air-icons.tar.gz 2>> $INSTALL_LOG +/bin/tar -C $TEMP_DIR -zxf ${TEMP_DIR}/air-icons.tar.gz 2>> $INSTALL_LOG +mv -f ${TEMP_DIR}/*.xbm $ICON_DIR 2>> $INSTALL_LOG +mv -f ${TEMP_DIR}/*.gif $ICON_DIR 2>> $INSTALL_LOG +rm -f ${TEMP_DIR}/air-icons.tar.gz 2>> $INSTALL_LOG echo "Install of icons is complete." | tee -a $INSTALL_LOG echo "" #unzip and install split echo "Unpacking and installing split..." | tee -a $INSTALL_LOG -/bin/gunzip /tmp/split.gz 2>> $INSTALL_LOG -mv -f /tmp/split /usr/local/bin/split 2>> $INSTALL_LOG -chmod +x /usr/local/bin/split 2>> $INSTALL_LOG -rm -f /tmp/split 2>> $INSTALL_LOG +/bin/gunzip ${TEMP_DIR}/split.gz 2>> $INSTALL_LOG +mv -f ${TEMP_DIR}/split ${INSTALL_DIR}/bin/split 2>> $INSTALL_LOG +chmod +x ${INSTALL_DIR}/bin/split 2>> $INSTALL_LOG +rm -f ${TEMP_DIR}/split 2>> $INSTALL_LOG echo "Install of split is complete." | tee -a $INSTALL_LOG echo "" @@ -2719,8 +2720,8 @@ else echo "Installing AIR $VERSION..." | tee -a $INSTALL_LOG fi -mv -f /tmp/air /usr/local/bin/air 2>> $INSTALL_LOG -rm -f /tmp/air 2>> $INSTALL_LOG +mv -f ${TEMP_DIR}/air ${INSTALL_DIR}/bin/air 2>> $INSTALL_LOG +rm -f ${TEMP_DIR}/air 2>> $INSTALL_LOG if [ $UPGRADE = "yes" ]; then echo "Upgrade to AIR v$VERSION complete."