Changeset 58351 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Oct 21, 2015 8:59:00 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/autorun.sh
r58324 r58351 19 19 PATH=$PATH:/bin:/sbin:/usr/sbin 20 20 21 #include sh-utils.sh 21 # Deal with differing "which" semantics 22 mywhich() { 23 which "$1" 2>/dev/null | grep -v "no $1" 24 } 25 26 # Get the name and execute switch for a useful terminal emulator 27 # 28 # Sets $gxtpath to the emulator path or empty 29 # Sets $gxttitle to the "title" switch for that emulator 30 # Sets $gxtexec to the "execute" switch for that emulator 31 # May clobber $gtx* 32 # Calls mywhich 33 getxterm() { 34 # gnome-terminal uses -e differently to other emulators 35 for gxti in "konsole --title -e" "gnome-terminal --title -x" "xterm -T -e"; do 36 set $gxti 37 gxtpath="`mywhich $1`" 38 case "$gxtpath" in ?*) 39 gxttitle=$2 40 gxtexec=$3 41 return 42 ;; 43 esac 44 done 45 } 46 47 # Quotes its argument by inserting '\' in front of every character save 48 # for 'A-Za-z0-9/'. Prints the result to stdout. 49 quotify() { 50 echo "$1" | sed -e 's/\([^a-zA-Z0-9/]\)/\\\1/g' 51 } 22 52 23 53 ostype=`uname -s`
Note:
See TracChangeset
for help on using the changeset viewer.