Linux installer (issue #300): Added command line arguments support.
The argument --systemwide-directory has been added, for systemwide installations, to choose an installation directory other than the default /opt. Use -h or --help to get the proper syntax. Updated some email addresses too.
This commit is contained in:
parent
c81d75ac92
commit
e1ffdb6516
@ -14,7 +14,7 @@ RootName: @oolite-linux.berlios.de/oolite:$SOFTWAREVERSION
|
||||
DisplayName: Oolite for Linux
|
||||
ShortName: oolite
|
||||
Maintainer: Dylan Smith <dyls@alioth.net>
|
||||
Packager: Konstantinos Sykas <ksykas@gmail.com>
|
||||
Packager: Konstantinos Sykas <getafix@oolite.org>
|
||||
Summary: Oolite is an Elite tribute game that is easily expandable.
|
||||
URL: http://oolite.aegidian.org
|
||||
License: GNU GPL version 2
|
||||
|
@ -14,7 +14,7 @@ RootName: @oolite-linux.berlios.de/oolite:$SOFTWAREVERSION
|
||||
DisplayName: Oolite for Linux
|
||||
ShortName: oolite
|
||||
Maintainer: Dylan Smith <dyls@alioth.net>
|
||||
Packager: Konstantinos Sykas <ksykas@gmail.com>
|
||||
Packager: Konstantinos Sykas <getafix@oolite.org>
|
||||
Summary: Oolite is an Elite tribute game that is easily expandable.
|
||||
URL: http://oolite.aegidian.org
|
||||
License: GNU GPL version 2
|
||||
|
@ -1,3 +1,15 @@
|
||||
|
||||
#
|
||||
# Original by Stephane Peter <megastep@megastep.org>
|
||||
#
|
||||
# Type: shell script
|
||||
# Description: The package self-extraction wrapper script
|
||||
#
|
||||
# Konstantinos Sykas <getafix@oolite.org> changes follow:
|
||||
# (02-Jul-2018): Added list of Oolite setup arguments (only one at this time)
|
||||
#
|
||||
|
||||
|
||||
cat << EOF > "$archname"
|
||||
#!/bin/sh
|
||||
# This script was generated using Makeself $MS_VERSION
|
||||
@ -58,7 +70,8 @@ MS_dd()
|
||||
MS_Help()
|
||||
{
|
||||
cat << EOH >&2
|
||||
Makeself version $MS_VERSION
|
||||
Oolite v\$scriptargs Self-Extracting Installer Package Help
|
||||
(made with Makeself version $MS_VERSION)
|
||||
1) Getting help or info about \$0 :
|
||||
\$0 --help Print this message
|
||||
\$0 --info Print embedded info : title, default target directory, embedded script ...
|
||||
@ -67,17 +80,21 @@ Makeself version $MS_VERSION
|
||||
\$0 --check Checks integrity of the archive
|
||||
|
||||
2) Running \$0 :
|
||||
\$0 [options] [--] [additional arguments to embedded script]
|
||||
\$0 [options] [--] [additional arguments for Oolite setup script]
|
||||
with following options (in that order)
|
||||
--confirm Ask before running embedded script
|
||||
--noexec Do not run embedded script
|
||||
--keep Do not erase target directory after running
|
||||
the embedded script
|
||||
--nox11 Do not spawn an xterm
|
||||
--nochown Do not give the extracted files to the current user
|
||||
--target NewDirectory Extract in NewDirectory
|
||||
--tar arg1 [arg2 ...] Access the contents of the archive through the tar command
|
||||
-- Following arguments will be passed to the embedded script
|
||||
--confirm Ask before running embedded script
|
||||
--noexec Do not run embedded script
|
||||
--keep Do not erase target directory after running the embedded script
|
||||
--nox11 Do not spawn an xterm
|
||||
--nochown Do not give the extracted files to the current user
|
||||
--target NewDirectory Extract in NewDirectory
|
||||
--tar arg1 [arg2 ...] Access the contents of the archive through the tar command
|
||||
-- [--arg1 --arg2 ...] Arguments will be passed to the Oolite setup script
|
||||
|
||||
List of Oolite setup arguments (in that order):
|
||||
--systemwide-directory DIRECTORY (default: /opt) Set the systemwide installation directory
|
||||
|
||||
Report bugs to https://github.com/OoliteProject/oolite/issues
|
||||
EOH
|
||||
}
|
||||
|
||||
|
@ -71,8 +71,8 @@
|
||||
# Please read the license at http://www.gnu.org/copyleft/gpl.html
|
||||
#
|
||||
#
|
||||
# Konstantinos Sykas <getafix@oolite.org> (26-Mar-2011): Altered TAR arguments (lines 138 and 354) for Oolite purposes.
|
||||
# Konstantinos Sykas <getafix@oolite.org> (29-Jun-2018): Altered TAR arguments (line 354) to exclude git files
|
||||
# Konstantinos Sykas <getafix@oolite.org> (26-Mar-2011): Altered TAR arguments (lines 136 and 350) for Oolite purposes.
|
||||
# Konstantinos Sykas <getafix@oolite.org> (29-Jun-2018): Altered TAR arguments (line 350) to exclude git files
|
||||
#
|
||||
|
||||
MS_VERSION=2.1.5
|
||||
@ -130,8 +130,6 @@ NOX11=n
|
||||
APPEND=n
|
||||
COPY=none
|
||||
#
|
||||
# Konstantinos Sykas <ksykas@gmail.com> (26-Mar-2011): Altered for Oolite packaging purposes. TAR not to verbosely list files processed.
|
||||
#
|
||||
# original source:
|
||||
# TAR_ARGS=cvf
|
||||
#
|
||||
@ -344,8 +342,6 @@ echo About to compress $USIZE KB of data...
|
||||
echo Adding files to archive named \"$archname\"...
|
||||
exec 3<> "$tmpfile"
|
||||
#
|
||||
# Konstantinos Sykas <ksykas@gmail.com> (26-Mar-2011): Altered for Oolite packaging purposes. TAR is excluding subversion files.
|
||||
#
|
||||
# original source:
|
||||
# (cd "$archdir" && ( tar $TAR_ARGS - . | eval "$GZIP_CMD" >&3 ) ) || { echo Aborting: Archive
|
||||
# directory
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
#
|
||||
# Original by Konstantinos Sykas <ksykas@gmail.com> (26-Mar-2011)
|
||||
# Original by Konstantinos Sykas <getafix@oolite.org> (26-Mar-2011)
|
||||
#
|
||||
# Type: shell script
|
||||
# Description: The Oolite installation script, executed following the package self-extraction.
|
||||
@ -8,15 +8,44 @@
|
||||
# 2011-04-03: Updated to facilitate rsync repository setup for oolite-update script
|
||||
# 2011-04-04: Redirected "which" stderr to /dev/null. In some distros (e.g. Fedora 11, Mint 10 Julia etc.)
|
||||
# the "which <filename>" command uses stderr to report a file not found or other warnings
|
||||
# 2018-07-02: Add command line arguments support.
|
||||
# First argument added is "--systemwide-path Directory"
|
||||
#
|
||||
|
||||
|
||||
# Handle the command line arguments
|
||||
OOLITE_VERSION=$1 # This value is given in the make_installer.sh script. Check the line where makeself.sh is called; the last argument.
|
||||
shift
|
||||
while true
|
||||
do
|
||||
case "$1" in
|
||||
--systemwide-directory)
|
||||
INSTALL_ROOT_SYSTEMWIDE=${2:-.}/dummy
|
||||
INSTALL_ROOT_SYSTEMWIDE=`dirname $INSTALL_ROOT_SYSTEMWIDE`
|
||||
if [ ! -d "$INSTALL_ROOT_SYSTEMWIDE" ]; then
|
||||
echo System directory $INSTALL_ROOT_SYSTEMWIDE does not exist. Exiting...
|
||||
exit 1
|
||||
fi
|
||||
shift 2
|
||||
;;
|
||||
-*)
|
||||
echo Unrecognized Oolite setup flag : "$1" >&2
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# Environment vars init part 1 of 2
|
||||
OOLITE_VERSION=$1
|
||||
INSTALL_ROOT=""
|
||||
OOLITE_ROOT_NAME="Oolite${TRUNK}"
|
||||
OOLITEAPP_NAME="oolite.app"
|
||||
if [ ! ${INSTALL_ROOT_SYSTEMWIDE} ]
|
||||
then
|
||||
INSTALL_ROOT_SYSTEMWIDE="/opt"
|
||||
fi
|
||||
INSTALL_ROOT_USERHOME="GNUstep/Applications" # CAUTION! Depending on the usage, this should be sometimes manually pre-pended with $HOME/
|
||||
STARTUP_SCRIPTS_PATH_SYSTEMWIDE="/usr/local/bin"
|
||||
STARTUP_SCRIPTS_PATH_USERHOME="${INSTALL_ROOT_USERHOME}/${OOLITE_ROOT_NAME}" # CAUTION! Depending on the usage, this should be sometimes manually pre-pended with $HOME/
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
#
|
||||
# Original by Konstantinos Sykas <ksykas@gmail.com> (26-Mar-2011)
|
||||
# Original by Konstantinos Sykas <getafix@oolite.org> (26-Mar-2011)
|
||||
#
|
||||
# Type: shell script
|
||||
# Description: The Oolite uninstall script. During installation the "setup" script
|
||||
|
Loading…
x
Reference in New Issue
Block a user