mirror of
https://github.com/mtan93/Installomator.git
synced 2026-04-02 14:23:08 +01:00
RETURN_LABEL_NAME implemented
When using DEPNotify I would like Installomator to return a nice name for the label to show as status in DEPNotify, instead of only the label name. This way we can do that. And maybe in the fute include a description of the software, if people are seeking inspiration to software by looking at Installomator (that contains a lot of preferred solution for many)
This commit is contained in:
@@ -18,6 +18,10 @@ cleanupAndExit() { # $1 = exit code, $2 message
|
|||||||
# If we closed any processes, reopen the app again
|
# If we closed any processes, reopen the app again
|
||||||
reopenClosedProcess
|
reopenClosedProcess
|
||||||
printlog "################## End Installomator, exit code $1 \n\n"
|
printlog "################## End Installomator, exit code $1 \n\n"
|
||||||
|
# if label is wrong and we wanted name of the label, then return ##################
|
||||||
|
if [[ $RETURN_LABEL_NAME -eq 1 ]]; then
|
||||||
|
echo "##################"
|
||||||
|
fi
|
||||||
exit "$1"
|
exit "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,14 @@ REOPEN="yes"
|
|||||||
# - yes App wil be reopened if it was closed
|
# - yes App wil be reopened if it was closed
|
||||||
# - no App not reopened
|
# - no App not reopened
|
||||||
|
|
||||||
|
# Only let Installomator return the name of the label
|
||||||
|
# RETURN_LABEL_NAME=0
|
||||||
|
# options:
|
||||||
|
# - 1 Installomator will return the name of the label and exit, so last line of
|
||||||
|
# output will be that name. When Installomator is locally installed and we
|
||||||
|
# use DEPNotify, then DEPNotify can present a more nice name to the user,
|
||||||
|
# instead of just the label name.
|
||||||
|
|
||||||
|
|
||||||
# NOTE: How labels work
|
# NOTE: How labels work
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,13 @@
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Are we only asked to return label name
|
||||||
|
if [[ $RETURN_LABEL_NAME -eq 1 ]]; then
|
||||||
|
printlog "Only returning label name."
|
||||||
|
printlog "$name"
|
||||||
|
echo "$name"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# MARK: application download and installation starts here
|
# MARK: application download and installation starts here
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user