mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Variables cleaning
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
|
LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
|
||||||
|
|
||||||
what="firefoxpkg" # enter the software to install
|
item="firefoxpkg" # enter the software to install
|
||||||
# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg
|
# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg
|
||||||
|
|
||||||
installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated by space
|
installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated by space
|
||||||
@@ -28,7 +28,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated b
|
|||||||
# INSTALL=force
|
# INSTALL=force
|
||||||
######################################################################
|
######################################################################
|
||||||
# To be used as a script sent out from a MDM.
|
# To be used as a script sent out from a MDM.
|
||||||
# Fill the variable "what" above with a label.
|
# Fill the variable "item" above with a label.
|
||||||
# Script will run this label through Installomator.
|
# Script will run this label through Installomator.
|
||||||
######################################################################
|
######################################################################
|
||||||
# v. 9.2.1 : Better logging handling and installomatorOptions fix.
|
# v. 9.2.1 : Better logging handling and installomatorOptions fix.
|
||||||
@@ -38,7 +38,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated b
|
|||||||
# PATH declaration
|
# PATH declaration
|
||||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||||
|
|
||||||
echo "$(date +%F\ %T) [LOG-BEGIN] $what"
|
echo "$(date +%F\ %T) [LOG-BEGIN] $item"
|
||||||
|
|
||||||
# Verify that Installomator has been installed
|
# Verify that Installomator has been installed
|
||||||
destFile="/usr/local/Installomator/Installomator.sh"
|
destFile="/usr/local/Installomator/Installomator.sh"
|
||||||
@@ -59,16 +59,16 @@ caffexit () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Install software using Installomator
|
# Install software using Installomator
|
||||||
cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || true)"
|
cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true)"
|
||||||
|
|
||||||
# Check result
|
# Check result
|
||||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||||
if [[ ${exitStatus} -eq 0 ]] ; then
|
if [[ ${exitStatus} -eq 0 ]] ; then
|
||||||
echo "${what} succesfully installed."
|
echo "${item} succesfully installed."
|
||||||
warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )"
|
warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )"
|
||||||
echo "$warnOutput"
|
echo "$warnOutput"
|
||||||
else
|
else
|
||||||
echo "ERROR installing ${what}. Exit code ${exitStatus}"
|
echo "ERROR installing ${item}. Exit code ${exitStatus}"
|
||||||
echo "$cmdOutput"
|
echo "$cmdOutput"
|
||||||
#errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
#errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||||
#echo "$errorOutput"
|
#echo "$errorOutput"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
|
LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
|
||||||
|
|
||||||
what="" # enter the software to install
|
item="" # enter the software to install
|
||||||
# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg
|
# Examples: microsoftedge, brave, googlechromepkg, firefoxpkg
|
||||||
|
|
||||||
installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=all" # Separated by space
|
installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit NOTIFY=all" # Separated by space
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
|
LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
|
||||||
|
|
||||||
what="" # enter the software to install
|
item="" # enter the software to install
|
||||||
# Examples: adobecreativeclouddesktop, canva, cyberduck, handbrake, inkscape, textmate, vlc
|
# Examples: adobecreativeclouddesktop, canva, cyberduck, handbrake, inkscape, textmate, vlc
|
||||||
|
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all" # Separate
|
|||||||
# INSTALL=force
|
# INSTALL=force
|
||||||
######################################################################
|
######################################################################
|
||||||
# To be used as a script sent out from a MDM.
|
# To be used as a script sent out from a MDM.
|
||||||
# Fill the variable "what" above with a label.
|
# Fill the variable "item" above with a label.
|
||||||
# Script will run this label through Installomator.
|
# Script will run this label through Installomator.
|
||||||
######################################################################
|
######################################################################
|
||||||
# v. 9.2.1 : Better logging handling and installomatorOptions fix.
|
# v. 9.2.1 : Better logging handling and installomatorOptions fix.
|
||||||
@@ -39,7 +39,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user NOTIFY=all" # Separate
|
|||||||
# PATH declaration
|
# PATH declaration
|
||||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||||
|
|
||||||
echo "$(date +%F\ %T) [LOG-BEGIN] $what"
|
echo "$(date +%F\ %T) [LOG-BEGIN] $item"
|
||||||
|
|
||||||
# Verify that Installomator has been installed
|
# Verify that Installomator has been installed
|
||||||
destFile="/usr/local/Installomator/Installomator.sh"
|
destFile="/usr/local/Installomator/Installomator.sh"
|
||||||
@@ -60,16 +60,16 @@ caffexit () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Install software using Installomator
|
# Install software using Installomator
|
||||||
cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || true)"
|
cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true)"
|
||||||
|
|
||||||
# Check result
|
# Check result
|
||||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||||
if [[ ${exitStatus} -eq 0 ]] ; then
|
if [[ ${exitStatus} -eq 0 ]] ; then
|
||||||
echo "${what} succesfully installed."
|
echo "${item} succesfully installed."
|
||||||
warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )"
|
warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )"
|
||||||
echo "$warnOutput"
|
echo "$warnOutput"
|
||||||
else
|
else
|
||||||
echo "ERROR installing ${what}. Exit code ${exitStatus}"
|
echo "ERROR installing ${item}. Exit code ${exitStatus}"
|
||||||
echo "$cmdOutput"
|
echo "$cmdOutput"
|
||||||
#errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
#errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||||
#echo "$errorOutput"
|
#echo "$errorOutput"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
|
LOGO="" # "mosyleb", "mosylem", "addigy", "microsoft", "ws1"
|
||||||
|
|
||||||
what="dockutil" # enter the software to install
|
item="dockutil" # enter the software to install
|
||||||
# Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink
|
# Examples: applenyfonts, applesfarabic, applesfcompact, applesfmono, applesfpro, applesfsymbols, dialog, dockutil, knockknock, lulu, nomad, nudge, shield, supportapp, wordservice, xcreds, xink
|
||||||
|
|
||||||
installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated by space
|
installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated by space
|
||||||
@@ -28,7 +28,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated
|
|||||||
# INSTALL=force
|
# INSTALL=force
|
||||||
######################################################################
|
######################################################################
|
||||||
# To be used as a script sent out from a MDM.
|
# To be used as a script sent out from a MDM.
|
||||||
# Fill the variable "what" above with a label.
|
# Fill the variable "item" above with a label.
|
||||||
# Script will run this label through Installomator.
|
# Script will run this label through Installomator.
|
||||||
######################################################################
|
######################################################################
|
||||||
# v. 9.2.1 : Better logging handling and installomatorOptions fix.
|
# v. 9.2.1 : Better logging handling and installomatorOptions fix.
|
||||||
@@ -38,7 +38,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent" # Separated
|
|||||||
# PATH declaration
|
# PATH declaration
|
||||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||||
|
|
||||||
echo "$(date +%F\ %T) [LOG-BEGIN] $what"
|
echo "$(date +%F\ %T) [LOG-BEGIN] $item"
|
||||||
|
|
||||||
# Verify that Installomator has been installed
|
# Verify that Installomator has been installed
|
||||||
destFile="/usr/local/Installomator/Installomator.sh"
|
destFile="/usr/local/Installomator/Installomator.sh"
|
||||||
@@ -59,16 +59,16 @@ caffexit () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Install software using Installomator
|
# Install software using Installomator
|
||||||
cmdOutput="$(${destFile} ${what} LOGO=$LOGO ${installomatorOptions} || true)"
|
cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || true)"
|
||||||
|
|
||||||
# Check result
|
# Check result
|
||||||
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
|
||||||
if [[ ${exitStatus} -eq 0 ]] ; then
|
if [[ ${exitStatus} -eq 0 ]] ; then
|
||||||
echo "${what} succesfully installed."
|
echo "${item} succesfully installed."
|
||||||
warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )"
|
warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )"
|
||||||
echo "$warnOutput"
|
echo "$warnOutput"
|
||||||
else
|
else
|
||||||
echo "ERROR installing ${what}. Exit code ${exitStatus}"
|
echo "ERROR installing ${item}. Exit code ${exitStatus}"
|
||||||
echo "$cmdOutput"
|
echo "$cmdOutput"
|
||||||
#errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
#errorOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "error" || true )"
|
||||||
#echo "$errorOutput"
|
#echo "$errorOutput"
|
||||||
|
|||||||
Reference in New Issue
Block a user