aboutsummaryrefslogtreecommitdiff
path: root/libexec/app-install-file
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/app-install-file')
-rwxr-xr-xlibexec/app-install-file28
1 files changed, 26 insertions, 2 deletions
diff --git a/libexec/app-install-file b/libexec/app-install-file
index e2707a0..db9432b 100755
--- a/libexec/app-install-file
+++ b/libexec/app-install-file
@@ -9,13 +9,15 @@ APPSH_HOME=$(cd $(dirname "$0")/.. && pwd)
# HEADER END
usage_text() {
- echo "usage: $0 -v <version> -f <file>"
+ echo "usage: $0 -v <version> -f <file> [-C <config>] [-c <config>]"
}
version=
file=
+prepend_config=
+append_config=
-while getopts "v:f:" opt
+while getopts "v:f:C:c:" opt
do
case $opt in
v)
@@ -28,6 +30,16 @@ do
shift 2
OPTIND=1
;;
+ C)
+ prepend_config=$OPTARG
+ shift 2
+ OPTIND=1
+ ;;
+ c)
+ append_config=$OPTARG
+ shift 2
+ OPTIND=1
+ ;;
esac
done
@@ -53,12 +65,24 @@ then
exit 1
fi
+if [ -n "$prepend_config" ]
+then
+ debug "Prepending config from $prepend_config"
+ app-conf import "$prepend_config"
+fi
+
if [ -r versions/$version/app.config ]
then
debug "Importing config from package"
app-conf import versions/$version/app.config
fi
+if [ -n "$append_config" ]
+then
+ debug "Appending config from $append_config"
+ app-conf import "$append_config"
+fi
+
app-run-hook -v "$version" -h pre-install
app-set-version -v "$version"