diff options
Diffstat (limited to 'source/a/pkgtools/scripts/pkgtool')
-rw-r--r-- | source/a/pkgtools/scripts/pkgtool | 69 |
1 files changed, 13 insertions, 56 deletions
diff --git a/source/a/pkgtools/scripts/pkgtool b/source/a/pkgtools/scripts/pkgtool index fd77f298..000bb002 100644 --- a/source/a/pkgtools/scripts/pkgtool +++ b/source/a/pkgtools/scripts/pkgtool @@ -3,7 +3,7 @@ # Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999 Patrick Volkerding, Moorhead, MN USA # Copyright 2001, 2004 Slackware Linux, Inc., Concord, CA USA # All rights reserved. -# Copyright 2007, 2009, 2010, 2011, 2013, 2015 Patrick Volkerding, Sebeka, MN, USA +# Copyright 2007, 2009, 2010, 2011, 2013, 2015, 2016 Patrick Volkerding, Sebeka, MN, USA # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: @@ -13,7 +13,7 @@ # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; @@ -43,15 +43,6 @@ # Wed Jan 26 23:06:22 GMT 2005 # * Fix for non-standard package descriptions by Jim Hawkins -# Avoid problems if any files in /var/log/packages and /var/log/scripts -# might contain any broken UTF-8 sequences. This was once known to cause -# dialog to crash. -unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \ - LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \ - LC_IDENTIFICATION LC_ALL -LANG=C -export LANG - # Return a package name that has been stripped of the dirname portion # and any of the valid extensions (only): pkgbase() { @@ -86,7 +77,7 @@ if [ -L /bin/chmod -a -L /bin/chown ]; then # probably on the bootdisk using bus echo echo echo "You can't run pkgtool from the rootdisk until you've mounted your Linux" - echo "partitions beneath /mnt. Here are some examples:" + echo "partitions beneath /mnt. Here are some examples:" echo echo "If your root partition is /dev/sda1 you would type:" echo "mount /dev/sda1 /mnt" @@ -220,12 +211,11 @@ else # there were no arguments, so we'll get the needed information from the CMD_START="true" rm -f $TMP/SeT* while [ 0 ]; do - dialog --title "Slackware Package Tool (pkgtool version 14.2)" \ + dialog --title "Slackware Package Tool (pkgtool version 15.0)" \ --menu "\nWelcome to the Slackware package tool.\n\ -\nWhich option would you like?\n" 17 75 7 \ +\nWhich option would you like?\n" 16 75 6 \ "Current" "Install packages from the current directory" \ "Other" "Install packages from some other directory" \ -"Floppy" "Install packages from floppy disks" \ "Remove" "Remove packages that are currently installed" \ "View" "View the list of files contained in a package" \ "Setup" "Choose Slackware installation scripts to run again" \ @@ -243,7 +233,7 @@ else # there were no arguments, so we'll get the needed information from the fi if [ "$REPLY" = "Setup" ]; then echo 'dialog --title "SELECT SYSTEM SETUP SCRIPTS" --item-help --checklist \ - "Please use the spacebar to select the setup scripts to run. Hit enter when you \ + "Please use the spacebar to select the setup scripts to run. Hit enter when you \ are done selecting to run the scripts." 17 70 9 \' > $TMP/setupscr for script in $ADM_DIR/setup/setup.* ; do BLURB=$(grep '#BLURB' $script | cut -b8-) @@ -273,10 +263,10 @@ create_list_of_installed_packages #Pkgtool scans your system to determine which packages you have \ #installed and prepares a list for you." 0 0 ( - echo 'dialog $DEFITEM --item-help --menu "Please select the package you wish to view." 17 68 10 \ - --file $TMP/list_of_installed_packages \' - echo "2> $TMP/return" + echo 'dialog $DEFITEM --item-help --menu "Please select the package you wish to view." 17 68 10 \' ) > $TMP/viewscr + cat $TMP/list_of_installed_packages >> $TMP/viewscr + echo "2> $TMP/return" >> $TMP/viewscr while [ 0 ]; do . $TMP/viewscr if [ ! "$(cat $TMP/return)" = "" ]; then @@ -306,11 +296,11 @@ dialog --title "SELECT PACKAGES TO REMOVE" --item-help --checklist \ "Please select the \ packages you wish to Remove. Use the \ spacebar to select packages to delete, and the UP/DOWN arrow keys to \ -scroll up and down through the entire list." 20 75 11 \ ---file $TMP/temporary_list \\ +scroll up and down through the entire list." 20 75 11 \\ EOF - echo "2> $TMP/return" ) > $TMP/rmscript + cat $TMP/temporary_list >> $TMP/rmscript + echo "2> $TMP/return" >> $TMP/rmscript if [ -L $LOG -o -r $LOG ]; then rm -f $LOG fi @@ -334,39 +324,6 @@ in $TMP: PKGTOOL.REMOVED." 0 0 chmod 1777 /tmp # No, return to the main menu: # exit - elif [ "$REPLY" = "Floppy" ]; then - dialog --title "SELECT FLOPPY DRIVE" --menu "Which floppy drive would \ -you like to install from?" \ -11 70 4 \ -"/dev/fd0u1440" "1.44 MB first floppy drive" \ -"/dev/fd1u1440" "1.44 MB second floppy drive" \ -"/dev/fd0h1200" "1.2 MB first floppy drive" \ -"/dev/fd1h1200" "1.2 MB second floppy drive" 2> $TMP/wdrive - if [ $? = 1 ]; then - dialog --clear - exit - fi - SOURCE_DEVICE="$(cat $TMP/wdrive)" - rm -f $TMP/wdrive - cat << EOF > $TMP/tmpmsg - -Enter the names of any disk sets you would like to install. -Separate the sets with a space, like this: a b oi x - -To install packages from one disk, hit [enter] without typing -anything. - -EOF - dialog --title "SOFTWARE SELECTION" --inputbox "$(cat $TMP/tmpmsg)" 13 70 2> $TMP/sets - DISK_SETS="$(cat $TMP/sets)" - rm -f $TMP/sets - if [ "$DISK_SETS" = "" ]; then - DISK_SETS="disk" - else - DISK_SETS=$(echo $DISK_SETS | sed 's/ /#/g') - DISK_SETS="#$DISK_SETS" - fi - break; elif [ "$REPLY" = "Other" ]; then dialog --title "SELECT SOURCE DIRECTORY" --inputbox "Please enter the name of the directory that you wish to \ install packages from:" 10 50 2> $TMP/pkgdir @@ -562,7 +519,7 @@ install_disk() { fi # ! "$DISK_SETS" = "disk" - # It's possible that the tagfile was specified on the command line. If that's + # It's possible that the tagfile was specified on the command line. If that's # the case, then we'll just override whatever we figured out up above. if [ ! "$USETAG" = "" ]; then cat $USETAG > $TMP/tagfile |