Skip to content

Instantly share code, notes, and snippets.

@mvllow
Created March 24, 2020 00:03
Show Gist options
  • Save mvllow/96aabfa338a11c41f11a286985391ade to your computer and use it in GitHub Desktop.
Save mvllow/96aabfa338a11c41f11a286985391ade to your computer and use it in GitHub Desktop.
# 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