Skip to content

Commit

Permalink
Update vscode extensions list by cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
KELiON committed Jun 27, 2017
1 parent 26bc44c commit c4e73dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion vscode/setup
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -x

settings_path=~/Library/Application\ Support/Code/User
Expand All @@ -13,3 +13,9 @@ ln -s ~/.dotfiles/vscode/settings $settings_path

# install all extensions from list
while read in; do code --install-extension "$in"; done < ~/.dotfiles/vscode/extensions

# add cron job to update extensions list once in hour
crontab -l | sed '/vscode\/update-extensions-list/d' > mycron
echo "0 * * * * ~/.dotfiles/vscode/update-extensions-list" > mycron
crontab mycron
rm mycron
3 changes: 2 additions & 1 deletion vscode/update-extensions-list
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
code --list-extensions > ~/.dotfiles/vscode/extensions
#!/bin/bash
/usr/local/bin/code --list-extensions > ~/.dotfiles/vscode/extensions

0 comments on commit c4e73dd

Please sign in to comment.