VirtualBox

Changeset 58351 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Oct 21, 2015 8:59:00 AM (9 years ago)
Author:
vboxsync
Message:

Installer/linux (guest): get rid of more auto-generation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/autorun.sh

    r58324 r58351  
    1919PATH=$PATH:/bin:/sbin:/usr/sbin
    2020
    21 #include sh-utils.sh
     21# Deal with differing "which" semantics
     22mywhich() {
     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
     33getxterm() {
     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.
     49quotify() {
     50    echo "$1" | sed -e 's/\([^a-zA-Z0-9/]\)/\\\1/g'
     51}
    2252
    2353ostype=`uname -s`
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette