VirtualBox

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


Ignore:
Timestamp:
Apr 12, 2011 3:40:51 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71134
Message:

Additions/linux/installer: shell script refactoring

Location:
trunk/src/VBox/Additions/linux
Files:
2 edited

Legend:

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

    r36603 r36658  
    327327        $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
    328328
    329 INSTALLS += AutoRun-sh
    330 AutoRun-sh_INST = bin/additions/
    331 AutoRun-sh_MODE = a+rx,u+w
    332 AutoRun-sh_SOURCES = \
    333         $(VBOX_REL_LNX_INST_SRC)runasroot.sh \
    334         $(VBOX_REL_LNX_ADD_INST)autorun.sh
    335 
    336329
    337330#
  • trunk/src/VBox/Additions/linux/installer/autorun.sh

    r36626 r36658  
    11#!/bin/sh
     2# $Id$
    23#
    34# VirtualBox Guest Additions installation script for *nix guests
     
    56
    67#
    7 # Copyright (C) 2009-2010 Oracle Corporation
     8# Copyright (C) 2009-2011 Oracle Corporation
    89#
    910# This file is part of VirtualBox Open Source Edition (OSE), as
     
    1819PATH=$PATH:/bin:/sbin:/usr/sbin
    1920
    20 # Deal with differing "which" semantics
    21 mywhich() {
    22     which "$1" 2>/dev/null | grep -v "no $1"
    23 }
    24 
    25 # Get the name and execute switch for a useful terminal emulator
    26 #
    27 # Sets $gxtpath to the emulator path or empty
    28 # Sets $gxttitle to the "title" switch for that emulator
    29 # Sets $gxtexec to the "execute" switch for that emulator
    30 # May clobber $gtx*
    31 # Calls mywhich
    32 getxterm() {
    33     # gnome-terminal uses -e differently to other emulators
    34     for gxti in "gnome-terminal --title -x" "konsole --title -e" "xterm -T -e"; do
    35         set $gxti
    36         gxtpath="`mywhich $1`"
    37         case "$gxtpath" in ?*)
    38             gxttitle=$2
    39             gxtexec=$3
    40             return
    41             ;;
    42         esac
    43     done
    44 }
    45 
    46 # Quotes its argument by inserting '\' in front of every character save
    47 # for 'A-Za-z0-9/'.  Prints the result to stdout.
    48 quotify() {
    49     echo "$1" | sed -e 's/\([^a-zA-Z0-9/]\)/\\\1/g'
    50 }
     21#include sh-utils.sh
    5122
    5223ostype=`uname -s`
Note: See TracChangeset for help on using the changeset viewer.

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