aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/extended_bin
diff options
context:
space:
mode:
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-xpriv/templates/extended_bin19
1 files changed, 8 insertions, 11 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index 2941083..d133570 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -312,13 +312,15 @@ case "$1" in
relx_rem_sh
;;
- upgrade|downgrade|install)
+ upgrade|downgrade|install|unpack)
if [ -z "$2" ]; then
echo "Missing version argument"
echo "Usage: $REL_NAME $1 {version}"
exit 1
fi
+ COMMAND="$1"; shift
+
# Make sure a node IS running
if ! relx_nodetool "ping" > /dev/null; then
echo "Node is not running!"
@@ -326,25 +328,20 @@ case "$1" in
fi
exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
- "install" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
+ "$COMMAND" "{'$REL_NAME', \"$NAME_TYPE\", '$NAME', '$COOKIE'}" "$@"
;;
- unpack)
- if [ -z "$2" ]; then
- echo "Missing package argument"
- echo "Usage: $REL_NAME $1 {package base name}"
- echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
- exit 1
- fi
-
+ versions)
# Make sure a node IS running
if ! relx_nodetool "ping" > /dev/null; then
echo "Node is not running!"
exit 1
fi
+ COMMAND="$1"; shift
+
exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
- "unpack" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
+ "versions" "{'$REL_NAME', \"$NAME_TYPE\", '$NAME', '$COOKIE'}" "$@"
;;
console|console_clean|console_boot)