Skip to content

Commit

Permalink
Add way to unlink.
Browse files Browse the repository at this point in the history
  • Loading branch information
aubreypwd committed Mar 31, 2021
1 parent c24262d commit d4d5c93
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions npm/scripts/unlink.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

function unlinkit {
local pwd=$(pwd)
local addondir="$HOME/Library/Application Support/Local/addons"
local addonpath="$addondir/local-tableplus"

if [ ! -d "$addondir" ]; then
echo "⚠️ Cannot locate $addondir, is Local installed?"
exit 0
fi

unlink "$addonpath"
echo "⛓ Unlinked $addonpath"
}

unlinkit
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"prepare": "tsc",
"watch": "watchexec 'npm run build'",
"link": "sh ./npm/scripts/symlink.sh",
"unlink": "sh ./npm/scripts/unlink.sh",
"dist": "rm -Rf *.tgz && node node_modules/npm-pack-all dist/",
"release": "npm run dist"
},
Expand Down

0 comments on commit d4d5c93

Please sign in to comment.