Created
March 24, 2020 00:03
-
-
Save mvllow/96aabfa338a11c41f11a286985391ade to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# cd Downloads | |
# sh extract-vsix.sh mvllow.rose-pine-0.3.5 | |
# ^ do not include .vsix | |
path="$1" | |
name="$(basename -- $1)" | |
out_dir=~/.vscode/extensions | |
tmp_dir=$(mktemp -d -t mvllow-dots) | |
mkdir -p "$out_dir" | |
mv "$path".vsix "$tmp_dir/$name".zip | |
unzip -d "$tmp_dir/$name-extra" "$tmp_dir/$name".zip &>/dev/null; | |
mv "$tmp_dir/$name-extra/extension" "$out_dir/$name" | |
rm -rf $tmp_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment