Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions setDock-addToDock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
# $6 = View ( grid - fan - list - auto )
# $7 = Display ( folder - stack )
# $8 = Sort ( name - dateadded - datemodified - datecreated - kind )
# $9 = Label ( Label or bundle identifier of item to add, remove, move or find )

if [[ $1 == '/' ]]; then
# when $1 is /, then use the variables from Jamf
Expand All @@ -35,13 +36,15 @@ if [[ $1 == '/' ]]; then
view="$6"
display="$7"
sort="$8"
label="$9"
else
# default values for testing
appPath="/Applications/Safari.app"
position="2"
view=""
display="folder"
sort=""
label=""
fi

# COLLECT IMPORTANT USER INFORMATION
Expand Down Expand Up @@ -107,6 +110,10 @@ if [[ ${sort} != "" ]]; then
arguments+=("--sort" "${sort}")
fi

if [[ ${label} != "" ]]; then
arguments+=("--label" "${label}")
fi

# Add Application our Files and Documents to the Dock
if [[ -e ${appPath} ]]; then
echo "Run command runAsUser ${dockutil} ${arguments} ${plist}"
Expand Down