Created
          July 9, 2018 09:52 
        
      - 
      
 - 
        
Save SkeLLLa/8709e1bd57c53668c8b901829368a67c to your computer and use it in GitHub Desktop.  
    VScode linux update script
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/usr/bin/env bash | |
| APPLICATIONS_PATH="$HOME/Applications" | |
| CODE_PATH="$APPLICATIONS_PATH/VSCode" | |
| DOWNLOAD_URL="https://vscode-update.azurewebsites.net/latest/linux-x64/stable" | |
| echo "Downloading $DOWNLOAD_URL..." | |
| DOWNLOAD_PATH=$(mktemp) | |
| curl -L $DOWNLOAD_URL --output $DOWNLOAD_PATH | |
| echo "Downloaded to $DOWNLOAD_PATH" | |
| echo "Removing old version..." | |
| rm -rf $CODE_PATH | |
| echo "Extracting to $CODE_PATH..." | |
| mkdir -p $CODE_PATH | |
| tar xzf $DOWNLOAD_PATH -C $CODE_PATH --strip 1 | |
| rm $DOWNLOAD_PATH% | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Due to https://gist.github.com/joaomoreno/7d3926e67e91317cd9d053c2c3956ddc#gistcomment-2953721 , I suggest that you revise your script.