File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -89,13 +89,21 @@ case "$COMMAND" in
8989 ;;
9090 install)
9191 if [ -n " $FILE " ]; then
92- chmod +x " $FILE "
93- if ! " $FILE " --version; then
94- log " Failed to run new binary. tmpfile=$FILE "
95- exit " $EXIT_FAILURE "
92+ # Try extracting as a tar.gz archive directly into the bin folder
93+ if tar tzf " $FILE " > /dev/null 2>&1 ; then
94+ tar -xzf " $FILE " -C " @CONFIG_DIR@/bin/"
95+ if [ -f " @CONFIG_DIR@/bin/${MODULE_NAME} " ]; then
96+ chmod +x " @CONFIG_DIR@/bin/${MODULE_NAME} "
97+ fi
98+ else
99+ chmod +x " $FILE "
100+ if ! " $FILE " --version; then
101+ log " Failed to run new binary. tmpfile=$FILE "
102+ exit " $EXIT_FAILURE "
103+ fi
104+ log " Moving binary from $FILE to @CONFIG_DIR@/bin/${MODULE_NAME} "
105+ mv " $FILE " " @CONFIG_DIR@/bin/${MODULE_NAME} "
96106 fi
97- log " Moving binary from $FILE to @CONFIG_DIR@/bin/${MODULE_NAME} "
98- mv " $FILE " " @CONFIG_DIR@/bin/${MODULE_NAME} "
99107
100108 # post installation actions
101109 case " $MODULE_NAME " in
You can’t perform that action at this time.
0 commit comments