More flexible for various platforms.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@795 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
ESC=""
|
ESC=`printf "\x1b"`
|
||||||
ANSI_BOLD="${ESC}[1m"
|
ANSI_BOLD="${ESC}[1m"
|
||||||
ANSI_NORMAL="${ESC}[0m"
|
ANSI_NORMAL="${ESC}[0m"
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ usage() {
|
|||||||
|
|
||||||
# The actual recursing function
|
# The actual recursing function
|
||||||
build_recurse() {
|
build_recurse() {
|
||||||
local FILES SUBDIRS
|
typeset FILES SUBDIRS
|
||||||
# Perform an action for this dir
|
# Perform an action for this dir
|
||||||
eval FILES="\${$BUILD_FILES_VAR}"
|
eval FILES="\${$BUILD_FILES_VAR}"
|
||||||
for FILE in $FILES; do
|
for FILE in $FILES; do
|
||||||
@@ -69,7 +69,7 @@ build_dependancies() {
|
|||||||
|
|
||||||
# Recursively build dependancy information
|
# Recursively build dependancy information
|
||||||
build_rec_dependancies() {
|
build_rec_dependancies() {
|
||||||
local DEPEND_FILE EXTRA_OFILES
|
typeset DEPEND_FILE EXTRA_OFILES
|
||||||
|
|
||||||
echo "Building dependancy information..." 1>&2
|
echo "Building dependancy information..." 1>&2
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ build_collect_extra_o_files() {
|
|||||||
|
|
||||||
# Recursively collect .o-files
|
# Recursively collect .o-files
|
||||||
build_rec_collect_o_files() {
|
build_rec_collect_o_files() {
|
||||||
local EXTRA_OFILES
|
typeset EXTRA_OFILES
|
||||||
|
|
||||||
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
|
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
|
||||||
export BUILD_FILES_VAR
|
export BUILD_FILES_VAR
|
||||||
@@ -139,7 +139,7 @@ build_clean_dir() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build_clean() {
|
build_clean() {
|
||||||
local DEPEND_FILE
|
typeset DEPEND_FILE
|
||||||
eval DEPEND_FILE=".depend.\${${BUILD_PROJECT}_NAME%/}"
|
eval DEPEND_FILE=".depend.\${${BUILD_PROJECT}_NAME%/}"
|
||||||
rm -f "$DEPEND_FILE" build.vars config.state src/config.h
|
rm -f "$DEPEND_FILE" build.vars config.state src/config.h
|
||||||
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
|
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
|
||||||
@@ -183,7 +183,7 @@ build_check_dependencies() {
|
|||||||
|
|
||||||
# Description: check if the program is compiled, and otherwise compile
|
# Description: check if the program is compiled, and otherwise compile
|
||||||
build_check_compile() {
|
build_check_compile() {
|
||||||
local NAME
|
typeset NAME
|
||||||
eval NAME="\${${BUILD_PROJECT}_NAME}"
|
eval NAME="\${${BUILD_PROJECT}_NAME}"
|
||||||
[ ! -e "$NAME" ] || return
|
[ ! -e "$NAME" ] || return
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ build_check_compile() {
|
|||||||
|
|
||||||
# Install the program
|
# Install the program
|
||||||
build_install() {
|
build_install() {
|
||||||
local BINS LIBS SRC DEST DESTDIR BINDIR LIBDIR
|
typeset BINS LIBS SRC DEST DESTDIR BINDIR LIBDIR
|
||||||
|
|
||||||
echo "Installing libraries..." 2>&1
|
echo "Installing libraries..." 2>&1
|
||||||
eval LIBS="\${${BUILD_PROJECT}_INSTALL_LIBS}"
|
eval LIBS="\${${BUILD_PROJECT}_INSTALL_LIBS}"
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ lexlt() {
|
|||||||
# Description: check if a program is present in the path
|
# Description: check if a program is present in the path
|
||||||
# Arguments:
|
# Arguments:
|
||||||
have_program() {
|
have_program() {
|
||||||
local TEMP_NAME TEMP_FILE TEMP_VERSION
|
typeset TEMP_NAME TEMP_FILE TEMP_VERSION
|
||||||
|
|
||||||
eval eval TEMP_NAME="\\\"\$PROG_${1}_NAME\\\""
|
eval eval TEMP_NAME="\\\"\$PROG_${1}_NAME\\\""
|
||||||
if [ -z "$TEMP_NAME" ]; then
|
if [ -z "$TEMP_NAME" ]; then
|
||||||
@@ -151,7 +151,7 @@ but version $2 is required!"
|
|||||||
# Returns: 0 - if the library is found
|
# Returns: 0 - if the library is found
|
||||||
# 1 - if the library is not found
|
# 1 - if the library is not found
|
||||||
have_library() {
|
have_library() {
|
||||||
local LIB TEMP_NAME TEMP_PRESENT TEMP_LDFLAGS TEMP_CFLAGS \
|
typeset LIB TEMP_NAME TEMP_PRESENT TEMP_LDFLAGS TEMP_CFLAGS \
|
||||||
TEMP_VERSION
|
TEMP_VERSION
|
||||||
|
|
||||||
LIB="$1"
|
LIB="$1"
|
||||||
@@ -213,7 +213,7 @@ but version $2 is required"
|
|||||||
# LIB_${1}_LDFLAGS are expected to exist. If two arguments are
|
# LIB_${1}_LDFLAGS are expected to exist. If two arguments are
|
||||||
# supplied, so is LIB_${1}_VERSION.
|
# supplied, so is LIB_${1}_VERSION.
|
||||||
use_library() {
|
use_library() {
|
||||||
local TEMP_CFLAGS TEMP_LDFLAGS
|
typeset TEMP_CFLAGS TEMP_LDFLAGS
|
||||||
have_library "$@"
|
have_library "$@"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ use_library() {
|
|||||||
# Description: check if a symbol is defined.
|
# Description: check if a symbol is defined.
|
||||||
# Arguments: $1 - the name of the symbol
|
# Arguments: $1 - the name of the symbol
|
||||||
have_symbol() {
|
have_symbol() {
|
||||||
local SYMBOL
|
typeset SYMBOL
|
||||||
SYMBOL="$1"
|
SYMBOL="$1"
|
||||||
|
|
||||||
# TODO: I'll want the include handling to be done differently
|
# TODO: I'll want the include handling to be done differently
|
||||||
@@ -256,7 +256,7 @@ EOF
|
|||||||
# name of the symbol.
|
# name of the symbol.
|
||||||
# Arguments: $1 - the name of the symbol
|
# Arguments: $1 - the name of the symbol
|
||||||
define_have_symbol() {
|
define_have_symbol() {
|
||||||
local NAME VALUE
|
typeset NAME VALUE
|
||||||
NAME=`$TR a-z A-Z << EOF
|
NAME=`$TR a-z A-Z << EOF
|
||||||
$1
|
$1
|
||||||
EOF
|
EOF
|
||||||
@@ -271,7 +271,7 @@ EOF
|
|||||||
# Description: check if a header is available.
|
# Description: check if a header is available.
|
||||||
# Arguments: $1 - the name of the header file
|
# Arguments: $1 - the name of the header file
|
||||||
have_header() {
|
have_header() {
|
||||||
local HEADER
|
typeset HEADER
|
||||||
HEADER="$1"
|
HEADER="$1"
|
||||||
|
|
||||||
try_compile_c "$TEMP_CFLAGS" "$TEMP_LDFLAGS" << EOF 2>&1 > /dev/null
|
try_compile_c "$TEMP_CFLAGS" "$TEMP_LDFLAGS" << EOF 2>&1 > /dev/null
|
||||||
@@ -293,7 +293,7 @@ EOF
|
|||||||
# name of the header file. "sys/time.h" becomes "SYS_TIME_H".
|
# name of the header file. "sys/time.h" becomes "SYS_TIME_H".
|
||||||
# Arguments: $1 - the name of the symbol
|
# Arguments: $1 - the name of the symbol
|
||||||
define_have_header() {
|
define_have_header() {
|
||||||
local NAME VALUE
|
typeset NAME VALUE
|
||||||
NAME=`$TR /.a-z __A-Z << EOF
|
NAME=`$TR /.a-z __A-Z << EOF
|
||||||
$1
|
$1
|
||||||
EOF
|
EOF
|
||||||
@@ -312,7 +312,7 @@ EOF
|
|||||||
# Arguments: $1 - the symbol to add
|
# Arguments: $1 - the symbol to add
|
||||||
# $2 - the value of the symbol
|
# $2 - the value of the symbol
|
||||||
add_symbol() {
|
add_symbol() {
|
||||||
local NAME
|
typeset NAME
|
||||||
|
|
||||||
eval NAME="$1"
|
eval NAME="$1"
|
||||||
eval "$NAME"=\"\$2\"
|
eval "$NAME"=\"\$2\"
|
||||||
@@ -349,7 +349,7 @@ EOF
|
|||||||
# If a filename doesn't end on .in, that filename is used
|
# If a filename doesn't end on .in, that filename is used
|
||||||
# as target, and the filename with .in attached as source.
|
# as target, and the filename with .in attached as source.
|
||||||
substitute_vars() {
|
substitute_vars() {
|
||||||
local VARS VAR VALUE FILES FILE
|
typeset VARS VAR VALUE FILES FILE
|
||||||
|
|
||||||
eval VARS=\"\$$1\"
|
eval VARS=\"\$$1\"
|
||||||
eval FILES=\"\$$2\"
|
eval FILES=\"\$$2\"
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ EOF
|
|||||||
# Arguments: $1 - the type of menu item
|
# Arguments: $1 - the type of menu item
|
||||||
# $2 - the name of the menu item
|
# $2 - the name of the menu item
|
||||||
menu_init() {
|
menu_init() {
|
||||||
local INIT_FUN
|
typeset INIT_FUN
|
||||||
|
|
||||||
eval INIT_FUN="\$MENU_ITEM_TYPE_$1_INIT"
|
eval INIT_FUN="\$MENU_ITEM_TYPE_$1_INIT"
|
||||||
"$INIT_FUN" "$2"
|
"$INIT_FUN" "$2"
|
||||||
@@ -66,7 +66,7 @@ menu_init() {
|
|||||||
# Description: Initialise this menu
|
# Description: Initialise this menu
|
||||||
# Arguments: $1 - the name of the menu
|
# Arguments: $1 - the name of the menu
|
||||||
menu_init_menu() {
|
menu_init_menu() {
|
||||||
local MENU TEMP_ITEMS ITEM TEMP_TYPE
|
typeset MENU TEMP_ITEMS ITEM TEMP_TYPE
|
||||||
|
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS"
|
eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS"
|
||||||
@@ -82,7 +82,7 @@ menu_init_menu() {
|
|||||||
# Returns: 0 - if the choice is available
|
# Returns: 0 - if the choice is available
|
||||||
# 1 - if the choice is not available
|
# 1 - if the choice is not available
|
||||||
menu_have_choice() {
|
menu_have_choice() {
|
||||||
local MENU CHOICE TEMP_VALID TEMP_PRECOND
|
typeset MENU CHOICE TEMP_VALID TEMP_PRECOND
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
CHOICE="$2"
|
CHOICE="$2"
|
||||||
eval TEMP_VALID="\$CHOICE_${MENU}_OPTION_${CHOICE}_VALID"
|
eval TEMP_VALID="\$CHOICE_${MENU}_OPTION_${CHOICE}_VALID"
|
||||||
@@ -101,7 +101,7 @@ menu_have_choice() {
|
|||||||
# Description: Initialise this choice menu
|
# Description: Initialise this choice menu
|
||||||
# Arguments: $1 - the name of the choice menu
|
# Arguments: $1 - the name of the choice menu
|
||||||
menu_init_choice() {
|
menu_init_choice() {
|
||||||
local MENU TEMP_VALUE TEMP_DEFAULT TEMP_OPTIONS OPTION TEMP_TITLE
|
typeset MENU TEMP_VALUE TEMP_DEFAULT TEMP_OPTIONS OPTION TEMP_TITLE
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE"
|
eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE"
|
||||||
eval TEMP_DEFAULT="\$CHOICE_${MENU}_DEFAULT"
|
eval TEMP_DEFAULT="\$CHOICE_${MENU}_DEFAULT"
|
||||||
@@ -121,7 +121,7 @@ menu_init_choice() {
|
|||||||
# Description: Initialise this input menu
|
# Description: Initialise this input menu
|
||||||
# Arguments: $1 - the name of the input menu
|
# Arguments: $1 - the name of the input menu
|
||||||
menu_init_input() {
|
menu_init_input() {
|
||||||
local MENU TEMP_VALUE TEMP_DEFAULT
|
typeset MENU TEMP_VALUE TEMP_DEFAULT
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
eval TEMP_VALUE="\$INPUT_${MENU}_VALUE"
|
eval TEMP_VALUE="\$INPUT_${MENU}_VALUE"
|
||||||
if [ -z "$TEMP_VALUE" ]; then
|
if [ -z "$TEMP_VALUE" ]; then
|
||||||
@@ -136,7 +136,7 @@ menu_init_input() {
|
|||||||
# $2 - the name of the menu item
|
# $2 - the name of the menu item
|
||||||
# Outputs: The string describing the value of the menu item
|
# Outputs: The string describing the value of the menu item
|
||||||
menu_print_value() {
|
menu_print_value() {
|
||||||
local PRINT_VALUE
|
typeset PRINT_VALUE
|
||||||
|
|
||||||
eval PRINT_VALUE="\$MENU_ITEM_TYPE_$1_PRINT_VALUE"
|
eval PRINT_VALUE="\$MENU_ITEM_TYPE_$1_PRINT_VALUE"
|
||||||
"$PRINT_VALUE" "$2"
|
"$PRINT_VALUE" "$2"
|
||||||
@@ -153,7 +153,7 @@ menu_print_value_menu() {
|
|||||||
# Arguments: $1 - the name of the choice menu item
|
# Arguments: $1 - the name of the choice menu item
|
||||||
# Outputs: The string describing the value of this choice menu
|
# Outputs: The string describing the value of this choice menu
|
||||||
menu_print_value_choice() {
|
menu_print_value_choice() {
|
||||||
local TEMP_VALUE TEMP_TITLE
|
typeset TEMP_VALUE TEMP_TITLE
|
||||||
eval TEMP_VALUE="\$CHOICE_$1_VALUE"
|
eval TEMP_VALUE="\$CHOICE_$1_VALUE"
|
||||||
eval TEMP_TITLE=\"\$CHOICE_$1_OPTION_${TEMP_VALUE}_TITLE\"
|
eval TEMP_TITLE=\"\$CHOICE_$1_OPTION_${TEMP_VALUE}_TITLE\"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@@ -165,7 +165,7 @@ EOF
|
|||||||
# Arguments: $1 - the name of the input menu item
|
# Arguments: $1 - the name of the input menu item
|
||||||
# Outputs: The value of the given input menu
|
# Outputs: The value of the given input menu
|
||||||
menu_print_value_input() {
|
menu_print_value_input() {
|
||||||
local TEMP_VALUE TEMP_TITLE
|
typeset TEMP_VALUE TEMP_TITLE
|
||||||
eval TEMP_VALUE="\$INPUT_$1_VALUE"
|
eval TEMP_VALUE="\$INPUT_$1_VALUE"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
$TEMP_VALUE
|
$TEMP_VALUE
|
||||||
@@ -177,7 +177,7 @@ EOF
|
|||||||
# $2 - the name of the menu item
|
# $2 - the name of the menu item
|
||||||
# Outputs: The string describing the value of the menu item
|
# Outputs: The string describing the value of the menu item
|
||||||
menu_handle() {
|
menu_handle() {
|
||||||
local HANDLER
|
typeset HANDLER
|
||||||
|
|
||||||
eval HANDLER="\$MENU_ITEM_TYPE_$1_HANDLER"
|
eval HANDLER="\$MENU_ITEM_TYPE_$1_HANDLER"
|
||||||
"$HANDLER" "$2"
|
"$HANDLER" "$2"
|
||||||
@@ -186,7 +186,7 @@ menu_handle() {
|
|||||||
# Description: Process a menu-type menu item
|
# Description: Process a menu-type menu item
|
||||||
# Arguments: $1 - The name of the menu
|
# Arguments: $1 - The name of the menu
|
||||||
menu_handle_menu() {
|
menu_handle_menu() {
|
||||||
local TEMP_ITEMS I CHOICE NUM_ITEMS TEMP_TYPE MENU ITEM TEMP_TITLE
|
typeset TEMP_ITEMS I CHOICE NUM_ITEMS TEMP_TYPE MENU ITEM TEMP_TITLE
|
||||||
eval TEMP_ITEMS="\$MENU_$1_ITEMS"
|
eval TEMP_ITEMS="\$MENU_$1_ITEMS"
|
||||||
|
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
@@ -248,7 +248,7 @@ EOF
|
|||||||
# Description: Process a choice-type menu item
|
# Description: Process a choice-type menu item
|
||||||
# Arguments: $1 - The name of the menu
|
# Arguments: $1 - The name of the menu
|
||||||
menu_handle_choice() {
|
menu_handle_choice() {
|
||||||
local TEMP_OPTIONS I CHOICE NUM_OPTIONS TEMP_TYPE MENU OPTION \
|
typeset TEMP_OPTIONS I CHOICE NUM_OPTIONS TEMP_TYPE MENU OPTION \
|
||||||
TEMP_VALUE TEMP_TITLE SELECTED
|
TEMP_VALUE TEMP_TITLE SELECTED
|
||||||
eval TEMP_OPTIONS="\$CHOICE_$1_OPTIONS"
|
eval TEMP_OPTIONS="\$CHOICE_$1_OPTIONS"
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@ EOF
|
|||||||
# Description: Process an input-type menu item
|
# Description: Process an input-type menu item
|
||||||
# Arguments: $1 - The name of the menu
|
# Arguments: $1 - The name of the menu
|
||||||
menu_handle_input() {
|
menu_handle_input() {
|
||||||
local ITEM TEMP_TITLE TEMP_VALUE TEMP_DEFAULT NEW_VALUE TEMP_VALIDATOR
|
typeset ITEM TEMP_TITLE TEMP_VALUE TEMP_DEFAULT NEW_VALUE TEMP_VALIDATOR
|
||||||
|
|
||||||
ITEM="$1"
|
ITEM="$1"
|
||||||
eval TEMP_TITLE="\$INPUT_${ITEM}_TITLE"
|
eval TEMP_TITLE="\$INPUT_${ITEM}_TITLE"
|
||||||
@@ -376,7 +376,7 @@ EOF
|
|||||||
# $2 - the name of the menu item
|
# $2 - the name of the menu item
|
||||||
# Outputs: The string describing the value of the menu item
|
# Outputs: The string describing the value of the menu item
|
||||||
menu_save() {
|
menu_save() {
|
||||||
local SAVE_FUN
|
typeset SAVE_FUN
|
||||||
eval SAVE_FUN="\$MENU_ITEM_TYPE_$1_SAVE"
|
eval SAVE_FUN="\$MENU_ITEM_TYPE_$1_SAVE"
|
||||||
"$SAVE_FUN" "$2"
|
"$SAVE_FUN" "$2"
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ menu_save() {
|
|||||||
# Arguments: $1 - the name of the menu
|
# Arguments: $1 - the name of the menu
|
||||||
# Outputs: The string describing the value of the menu
|
# Outputs: The string describing the value of the menu
|
||||||
menu_save_menu() {
|
menu_save_menu() {
|
||||||
local MENU TEMP_ITEMS ITEM TEMP_TYPE
|
typeset MENU TEMP_ITEMS ITEM TEMP_TYPE
|
||||||
|
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS"
|
eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS"
|
||||||
@@ -401,7 +401,7 @@ menu_save_menu() {
|
|||||||
# Arguments: $1 - the name of the choice menu
|
# Arguments: $1 - the name of the choice menu
|
||||||
# Outputs: The string describing the value of the choice menu
|
# Outputs: The string describing the value of the choice menu
|
||||||
menu_save_choice() {
|
menu_save_choice() {
|
||||||
local MENU TEMP_VALUE
|
typeset MENU TEMP_VALUE
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE"
|
eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@@ -414,7 +414,7 @@ EOF
|
|||||||
# Arguments: $1 - the name of the input menu
|
# Arguments: $1 - the name of the input menu
|
||||||
# Outputs: The string describing the value of the input menu
|
# Outputs: The string describing the value of the input menu
|
||||||
menu_save_input() {
|
menu_save_input() {
|
||||||
local MENU TEMP_VALUE
|
typeset MENU TEMP_VALUE
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
eval TEMP_VALUE="\$INPUT_${MENU}_VALUE"
|
eval TEMP_VALUE="\$INPUT_${MENU}_VALUE"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@@ -427,7 +427,7 @@ EOF
|
|||||||
# Arguments: $1 - the type of menu item
|
# Arguments: $1 - the type of menu item
|
||||||
# $2 - the name of the menu item
|
# $2 - the name of the menu item
|
||||||
menu_process() {
|
menu_process() {
|
||||||
local PROCESS_FUN
|
typeset PROCESS_FUN
|
||||||
eval PROCESS_FUN="\$MENU_ITEM_TYPE_$1_PROCESS"
|
eval PROCESS_FUN="\$MENU_ITEM_TYPE_$1_PROCESS"
|
||||||
"$PROCESS_FUN" "$2"
|
"$PROCESS_FUN" "$2"
|
||||||
}
|
}
|
||||||
@@ -436,7 +436,7 @@ menu_process() {
|
|||||||
# for a menu.
|
# for a menu.
|
||||||
# Arguments: $1 - the name of the menu
|
# Arguments: $1 - the name of the menu
|
||||||
menu_process_menu() {
|
menu_process_menu() {
|
||||||
local MENU TEMP_ITEMS ITEM TEMP_TYPE
|
typeset MENU TEMP_ITEMS ITEM TEMP_TYPE
|
||||||
|
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS"
|
eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS"
|
||||||
@@ -450,7 +450,7 @@ menu_process_menu() {
|
|||||||
# a choice menu.
|
# a choice menu.
|
||||||
# Arguments: $1 - the name of the choice menu
|
# Arguments: $1 - the name of the choice menu
|
||||||
menu_process_choice() {
|
menu_process_choice() {
|
||||||
local MENU TEMP_VALUE TEMP_ACTION
|
typeset MENU TEMP_VALUE TEMP_ACTION
|
||||||
MENU="$1"
|
MENU="$1"
|
||||||
eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE"
|
eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE"
|
||||||
eval TEMP_ACTION="\$CHOICE_${MENU}_OPTION_${TEMP_VALUE}_ACTION"
|
eval TEMP_ACTION="\$CHOICE_${MENU}_OPTION_${TEMP_VALUE}_ACTION"
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ chmod -R go+rX "${TEMPDIR}/lib"
|
|||||||
|
|
||||||
echo "Making tar.gz file for everything except from the content."
|
echo "Making tar.gz file for everything except from the content."
|
||||||
echo "Using maximum compression; this may take a moment."
|
echo "Using maximum compression; this may take a moment."
|
||||||
tar -cf "${TEMPDIR}/libpkg.tar" -C "${TEMPDIR}/lib/" uqm
|
tar -c -C "${TEMPDIR}/lib/" uqm | gzip -9 > "${TEMPDIR}/libpkg.tar.gz"
|
||||||
gzip -9 "${TEMPDIR}/libpkg.tar"
|
|
||||||
|
|
||||||
echo "Making final executable."
|
echo "Making final executable."
|
||||||
sh build/unix_installer/mkinstall "$DESTFILE" "${TEMPDIR}/libpkg.tar.gz" \
|
sh build/unix_installer/mkinstall "$DESTFILE" "${TEMPDIR}/libpkg.tar.gz" \
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ mkdir -p -- "$INSTALL_BASE"/lib/uqm 2> /dev/null
|
|||||||
mkdir -p -- "$INSTALL_BASE"/bin 2> /dev/null
|
mkdir -p -- "$INSTALL_BASE"/bin 2> /dev/null
|
||||||
|
|
||||||
echo "Unpacking content..."
|
echo "Unpacking content..."
|
||||||
tar -xzf "$CONTENT_FILE" -C "$INSTALL_BASE"lib/uqm
|
gzip -dc "$CONTENT_FILE" | tar -xzf - -C "$INSTALL_BASE"lib/uqm
|
||||||
|
|
||||||
echo "Unpacking other stuff..."
|
echo "Unpacking other stuff..."
|
||||||
tail -c @ATTACHLEN@ < "$0" | tar -xzf - -C "$INSTALL_BASE"lib/
|
tail -c @ATTACHLEN@ < "$0" | tar -xzf - -C "$INSTALL_BASE"lib/
|
||||||
|
|||||||
Reference in New Issue
Block a user