-
-
Save 6220119/81bc6326e1d4eed6ecd66fb47ef71acc 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