VirtualBox

Changeset 58351 in vbox


Ignore:
Timestamp:
Oct 21, 2015 8:59:00 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103554
Message:

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

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/Makefile.kmk

    r56294 r58351  
    7676
    7777 ifeq ($(KBUILD_TARGET),linux)
     78
    7879  INSTALLS += LnxAddIso-scripts
    7980  LnxAddIso-scripts_INST    = $(INST_ADDITIONS)
    8081  LnxAddIso-scripts_MODE    = a+rx,u+w
    8182  LnxAddIso-scripts_SOURCES = \
    82         $(LnxAddIso-scripts_0_OUTDIR)/runasroot.sh \
    83         $(LnxAddIso-scripts_0_OUTDIR)/autorun.sh
    84   LnxAddIso-scripts_CLEAN = \
    85         $(LnxAddIso-scripts_0_OUTDIR)/runasroot.sh \
    86         $(LnxAddIso-scripts_0_OUTDIR)/autorun.sh
    87 
    88   $$(LnxAddIso-scripts_0_OUTDIR)/runasroot.sh: \
    89                 $(PATH_SUB_CURRENT)/../Installer/linux/runasroot.sh \
    90                 $(PATH_SUB_CURRENT)/../Installer/linux/sh-utils.sh \
    91                 | $$(dir $$@)
    92         $(QUIET)$(SED) \
    93                 -e '/#include sh-utils.sh/ {' \
    94                 -e "r $(PATH_ROOT)/src/VBox/Installer/linux/sh-utils.sh" \
    95                 -e 'd' \
    96                 -e '}' \
    97                 --output $@ \
    98                 $<
    99         $(QUIET)$(CHMOD) a+rx,u+w $@
    100 
    101   $$(LnxAddIso-scripts_0_OUTDIR)/autorun.sh: \
    102                 $(PATH_SUB_CURRENT)/linux/installer/autorun.sh \
    103                 $(PATH_SUB_CURRENT)/../Installer/linux/sh-utils.sh \
    104                 | $$(dir $$@)
    105         $(QUIET)$(SED) \
    106                 -e '/#include sh-utils.sh/ {' \
    107                 -e "r $(PATH_ROOT)/src/VBox/Installer/linux/sh-utils.sh" \
    108                 -e 'd' \
    109                 -e '}' \
    110                 --output $@ \
    111                 $<
    112         $(QUIET)$(CHMOD) a+rx,u+w $@
     83                ../Installer/linux/runasroot.sh \
     84                linux/installer/autorun.sh
     85
    11386 endif # KBUILD_TARGET == linux
    11487 ifeq ($(KBUILD_TARGET),win)
  • 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`
  • trunk/src/VBox/Installer/linux/runasroot.sh

    r56299 r58351  
    1717#
    1818
    19 #include sh-utils.sh
     19# Deal with differing "which" semantics
     20mywhich() {
     21    which "$1" 2>/dev/null | grep -v "no $1"
     22}
     23
     24# Get the name and execute switch for a useful terminal emulator
     25#
     26# Sets $gxtpath to the emulator path or empty
     27# Sets $gxttitle to the "title" switch for that emulator
     28# Sets $gxtexec to the "execute" switch for that emulator
     29# May clobber $gtx*
     30# Calls mywhich
     31getxterm() {
     32    # gnome-terminal uses -e differently to other emulators
     33    for gxti in "konsole --title -e" "gnome-terminal --title -x" "xterm -T -e"; do
     34        set $gxti
     35        gxtpath="`mywhich $1`"
     36        case "$gxtpath" in ?*)
     37            gxttitle=$2
     38            gxtexec=$3
     39            return
     40            ;;
     41        esac
     42    done
     43}
     44
     45# Quotes its argument by inserting '\' in front of every character save
     46# for 'A-Za-z0-9/'.  Prints the result to stdout.
     47quotify() {
     48    echo "$1" | sed -e 's/\([^a-zA-Z0-9/]\)/\\\1/g'
     49}
    2050
    2151ostype=`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