mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 09:40:26 +00:00
Merge pull request #233 from myii/bug/fix-shellcheck-errors
fix(mac_shortcut.sh): fix `shellcheck` errors
This commit is contained in:
commit
77473d1688
1 changed files with 2 additions and 2 deletions
|
@ -2,10 +2,10 @@
|
|||
|
||||
CMD='/usr/bin/osascript -e'
|
||||
|
||||
if [[ -e "{{ home }}/{{ user }}/Desktop/{{ app }}" ]] && [[ "${1}" -eq "remove" ]]
|
||||
if [[ -e "{{ home }}/{{ user }}/Desktop/{{ app }}" ]] && [[ "${1}" == "remove" ]]
|
||||
then
|
||||
$CMD "tell application \"Finder\" to delete POSIX file \"{{home}}/{{user}}/Desktop/{{ app }}\""
|
||||
elif [[ -e "{{ dir }}/{{ app ~ '.app' if suffix else app }}" ]] && [[ "${1}" -eq "add" ]]
|
||||
elif [[ -e "{{ dir }}/{{ app ~ '.app' if suffix else app }}" ]] && [[ "${1}" == "add" ]]
|
||||
then
|
||||
$CMD "tell application \"Finder\" to delete POSIX file \"{{home}}/{{user}}/Desktop/{{ app }}\"" >/dev/null 2>&1
|
||||
$CMD "tell application \"Finder\" to make new Alias at (path to desktop folder) to POSIX file \"{{ dir }}/{{ app }}{{ suffix or '' }}\""
|
||||
|
|
Loading…
Add table
Reference in a new issue