From 1ebc2bbf57a81bf6ea5578e79976545cd37ee0bc Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 6 Apr 2024 14:05:17 +0200 Subject: [PATCH 1/8] Deprecate coverage action inputs They are no longer used. 1. To generate code coverage reports latest available coverage package is installed as library by ST (requires Package Control!). Coverage reports are created from within ST's plugin environment. 2. Coverage reports are to be uploaded via via codecov action, which has to deal with installing required coverage python packages itself. --- actions/setup/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/setup/action.yaml b/actions/setup/action.yaml index 6753afe8..46b612fb 100644 --- a/actions/setup/action.yaml +++ b/actions/setup/action.yaml @@ -29,11 +29,11 @@ inputs: required: false default: '' install-coverage: - description: Whether to install coverage. + description: Whether to install coverage (DEPRECATED, no longer used). required: true default: true coverage-version: - description: Version of coverage. Use latest release if empty. + description: Version of coverage (DEPRECATED, no longer used). required: false default: '' install-package-control: From bc755281e815fdaded325173077540a30ce630fa Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 6 Apr 2024 14:06:38 +0200 Subject: [PATCH 2/8] Drop obsolete package recovery Package Control is configured not to auto-update or touch any package. Restoring something after installing Package Control is obsolete. --- actions/setup/action.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/actions/setup/action.yaml b/actions/setup/action.yaml index 46b612fb..133a4703 100644 --- a/actions/setup/action.yaml +++ b/actions/setup/action.yaml @@ -215,16 +215,3 @@ runs: run: | pwsh $Env:GITHUB_ACTION_PATH/install_package_control.ps1 --verbose shell: pwsh - - run: | - if [ "${{ inputs.install-package }}" = "true" ]; then - # package control may have updated the checked out repo, we need to restore it - if [ -f "$SUBLIME_TEXT_PACKAGES/$PACKAGE/dependency-metadata.json" ]; then - cd "${{ inputs.package-path }}" - rm -rf "$SUBLIME_TEXT_PACKAGES/$PACKAGE" - cp -r ./ "$SUBLIME_TEXT_PACKAGES/$PACKAGE" - rm -rf "$SUBLIME_TEXT_PACKAGES/$PACKAGE/.git" - touch "$SUBLIME_TEXT_PACKAGES/$PACKAGE/.sublime-dependency" - cd - - fi - fi - shell: bash From c22451fe95ea68c62ba62105805169487ab80657 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 6 Apr 2024 14:12:05 +0200 Subject: [PATCH 3/8] Add step names --- actions/setup/action.yaml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/actions/setup/action.yaml b/actions/setup/action.yaml index 133a4703..b6479400 100644 --- a/actions/setup/action.yaml +++ b/actions/setup/action.yaml @@ -58,7 +58,7 @@ inputs: runs: using: 'composite' steps: - - name: Set environmental variables + - name: Setup Environment Variables run: | echo "SUBLIME_TEXT_VERSION=${{ inputs.sublime-text-version }}" >> $GITHUB_ENV echo "SUBLIME_TEXT_ARCH=${{ inputs.sublime-text-arch }}" >> $GITHUB_ENV @@ -84,14 +84,16 @@ runs: fi echo "SUBLIME_TEXT_PACKAGES=$STP" >> $GITHUB_ENV shell: bash - - run: | + - name: Setup Sublime Text Path + run: | if [ "${{ runner.os }}" = "Windows" ]; then echo "c:\st" >> $GITHUB_PATH else echo "$HOME/.local/bin" >> $GITHUB_PATH fi shell: bash - - if: runner.os == 'Linux' + - name: Setup Graphical User Interface + if: runner.os == 'Linux' run: | sudo bash $GITHUB_ACTION_PATH/install_ubuntu_sys_req.sh echo "DISPLAY=:1" >> $GITHUB_ENV @@ -113,7 +115,8 @@ runs: fi fi shell: bash - - if: runner.os == 'Linux' + - name: Start Graphical User Interface + if: runner.os == 'Linux' run: | if [ "${{ inputs.display }}" = "xvfb" ]; then Xvfb $DISPLAY -screen 0 1024x768x24 -ac +extension GLX +render -noreset & @@ -138,15 +141,18 @@ runs: fi fi shell: bash - - if: runner.os == 'Linux' || runner.os == 'macOS' + - name: Install Sublime Text + if: runner.os == 'Linux' || runner.os == 'macOS' run: | bash $GITHUB_ACTION_PATH/install_sublime_text.sh shell: bash - - if: runner.os == 'Windows' + - name: Install Sublime Text + if: runner.os == 'Windows' run: | pwsh $Env:GITHUB_ACTION_PATH/install_sublime_text.ps1 --verbose shell: pwsh - - run: | + - name: Confugure Git + run: | # Disable warnings about detached HEAD # https://stackoverflow.com/questions/36794501 git config --global advice.detachedHead false @@ -154,7 +160,8 @@ runs: # block sublime text website ip bash $GITHUB_ACTION_PATH/block_ip.sh shell: bash - - run: | + - name: Determine Test Package + run: | REPO="$GITHUB_REPOSITORY" if [ "${{ inputs.install-package }}" = "true" ]; then cd "${{ inputs.package-path }}" @@ -170,7 +177,8 @@ runs: echo "PACKAGE=$PACKAGE" >> $GITHUB_ENV shell: bash - - run: | + - name: Install Packages + run: | . $GITHUB_ACTION_PATH/utils.sh # Copy plugin files to Packages/ folder if files are checked out. @@ -207,11 +215,13 @@ runs: InstallPackage "$PKG" "https://github.com/$USER/$REPO" "$SHA" done <<< "${{ inputs.extra-packages }}" shell: bash - - if: (runner.os == 'Linux' || runner.os == 'macOS') && inputs.install-package-control == 'true' + - name: Install Package Control + if: (runner.os == 'Linux' || runner.os == 'macOS') && inputs.install-package-control == 'true' run: | bash $GITHUB_ACTION_PATH/install_package_control.sh shell: bash - - if: runner.os == 'Windows' && inputs.install-package-control == 'true' + - name: Install Package Control + if: runner.os == 'Windows' && inputs.install-package-control == 'true' run: | pwsh $Env:GITHUB_ACTION_PATH/install_package_control.ps1 --verbose shell: pwsh From d295e04cbe758acb39bfe3f88ccc121978404591 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 6 Apr 2024 14:27:23 +0200 Subject: [PATCH 4/8] Don't start ST after installing Starting and stopping ST is just a waste of time. It will be started to install Package Control. --- actions/setup/install_sublime_text.sh | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/actions/setup/install_sublime_text.sh b/actions/setup/install_sublime_text.sh index a6c90983..f2086e67 100644 --- a/actions/setup/install_sublime_text.sh +++ b/actions/setup/install_sublime_text.sh @@ -110,13 +110,6 @@ if [ $(uname) = 'Darwin' ]; then # See https://github.com/SublimeText/UnitTesting/issues/200 /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister \ -f "$HOME/Applications/$SUBLIME_TEXT.app" - - # make `subl` available - open "$HOME/Applications/$SUBLIME_TEXT.app" - sleep 2 - pkill '[Ss]ubl' || true - pkill 'plugin_host' || true - sleep 2 else echo "Sublime Text was installed already!" exit 1 @@ -156,21 +149,12 @@ else fi done if [ $SUBLIME_TEXT_VERSION -ge 4 ]; then - # FIXME, move it to DOckerfile - sudo apt-get install -y xz-utils tar xf ~/sublimetext.tar.xz -C ~/ else tar jxf ~/sublimetext.tar.bz2 -C ~/ fi mkdir -p $HOME/.local/bin ln -sf "$HOME/$SUBLIME_TEXT/sublime_text" $HOME/.local/bin/subl - - # make `subl` available - "$HOME/$SUBLIME_TEXT/sublime_text" & - sleep 2 - pkill '[Ss]ubl' || true - pkill 'plugin_host' || true - sleep 2 else echo "Sublime Text was installed already!" exit 1 From 606f7e8fbdf0253e2f5321aa46cd8bccda216763 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 6 Apr 2024 18:08:52 +0200 Subject: [PATCH 5/8] Enable coverage on MacOS --- .github/workflows/test.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d899b022..1717ccc8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -35,8 +35,7 @@ jobs: - uses: "./actions/run-tests" with: coverage: true - - if: runner.os == 'Windows' || runner.os == 'Linux' - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v4 with: token: ${{secrets.CODECOV_TOKEN}} From 586f763fb537d3af0d467037d16957f9e1e08366 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 6 Apr 2024 18:14:59 +0200 Subject: [PATCH 6/8] Deprecate install-unittesting action input 1. Allowing to not install UnitTesting is odd as tests won't run without it. 2. Installing a version which is unrelated with current action revision is also odd and confusing. If a certain version is desired for CI, it can be selected via `SublimeText/UnitTesting/actions/setup@`. The `setup` action always installs the UnitTesting package, which is bundled with the action's revision, if UnitTesting is not the checked out package or hasn't been installed as extra-package. That's possible as the action is part of UnitTesting package. The package doesn't need to be re-downloaded. --- .github/workflows/test.yaml | 4 ---- actions/setup/action.yaml | 17 +++++++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1717ccc8..dde814e0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -31,7 +31,6 @@ jobs: - uses: "./actions/setup" with: sublime-text-version: ${{ matrix.st-version }} - install-unittesting: false - uses: "./actions/run-tests" with: coverage: true @@ -61,8 +60,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: SublimeText/UnitTesting/actions/setup@v1 - with: - install-unittesting: false - uses: SublimeText/UnitTesting/actions/run-tests@v1 test-as-extra-package: @@ -82,7 +79,6 @@ jobs: - uses: "./UnitTesting/actions/setup" with: package-path: UnitTesting-example - install-unittesting: false extra-packages: | SublimeText/UnitTesting - uses: "./UnitTesting/actions/run-tests" diff --git a/actions/setup/action.yaml b/actions/setup/action.yaml index b6479400..5923526d 100644 --- a/actions/setup/action.yaml +++ b/actions/setup/action.yaml @@ -21,11 +21,11 @@ inputs: required: true default: './' install-unittesting: - description: Whether to install UnitTesting. + description: Whether to install UnitTesting (DEPRECATED, replaced by SublimeText/UnitTesting/actions/setup@ref). required: true default: true unittesting-version: - description: Version of UnitTesting. Use latest release if empty. + description: Version of UnitTesting (DEPRECATED, replaced by SublimeText/UnitTesting/actions/setup@ref). required: false default: '' install-coverage: @@ -186,7 +186,7 @@ runs: cd "${{ inputs.package-path }}" if [ -d "./.git" ] && [ ! -d "$SUBLIME_TEXT_PACKAGES/$PACKAGE" ]; then # symlink does not play well with coverage - echo "copy the package to sublime package directory" + echo "Copy checked out package '$PACKAGE' to $SUBLIME_TEXT_PACKAGES/$PACKAGE" mkdir -p "$SUBLIME_TEXT_PACKAGES/$PACKAGE" cp -r ./ "$SUBLIME_TEXT_PACKAGES/$PACKAGE" # detached head will crash package control @@ -194,10 +194,8 @@ runs: fi cd - fi - if [ "${{ inputs.install-unittesting }}" = "true" ]; then - InstallPackage "UnitTesting" "https://github.com/SublimeText/UnitTesting" "${{ inputs.unittesting-version }}" - fi + # Install extra packages to to Packages/ while read -r x; do if [[ "$x" =~ ^(.*):(.*)/([^@]*)@?(.*)$ ]]; then PKG="${BASH_REMATCH[1]}" @@ -214,6 +212,13 @@ runs: fi InstallPackage "$PKG" "https://github.com/$USER/$REPO" "$SHA" done <<< "${{ inputs.extra-packages }}" + + # Install UnitTesting to Packages/UnitTesting if not yet exists + if [ ! -d "$SUBLIME_TEXT_PACKAGES/UnitTesting" ]; then + echo "Copy action's 'UnitTesting' to $SUBLIME_TEXT_PACKAGES/UnitTesting" + mkdir -p "$SUBLIME_TEXT_PACKAGES/UnitTesting" + cp -r "$GITHUB_ACTION_PATH/../../" "$SUBLIME_TEXT_PACKAGES/UnitTesting" + fi shell: bash - name: Install Package Control if: (runner.os == 'Linux' || runner.os == 'macOS') && inputs.install-package-control == 'true' From 99f248966448a1dd8aead37892858d7f1c3a8b43 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 6 Apr 2024 18:15:38 +0200 Subject: [PATCH 7/8] Refactor setup steps --- actions/setup/action.yaml | 170 +++++++++++++++++++------------------- 1 file changed, 84 insertions(+), 86 deletions(-) diff --git a/actions/setup/action.yaml b/actions/setup/action.yaml index 5923526d..f8817b6b 100644 --- a/actions/setup/action.yaml +++ b/actions/setup/action.yaml @@ -59,104 +59,99 @@ runs: using: 'composite' steps: - name: Setup Environment Variables - run: | - echo "SUBLIME_TEXT_VERSION=${{ inputs.sublime-text-version }}" >> $GITHUB_ENV - echo "SUBLIME_TEXT_ARCH=${{ inputs.sublime-text-arch }}" >> $GITHUB_ENV - shell: bash - - name: Setup SUBLIME_TEXT_PACKAGES - run: | - if [ $SUBLIME_TEXT_VERSION -ge 4 ]; then - if [ $(uname) = 'Darwin' ]; then - STP="$HOME/Library/Application Support/Sublime Text/Packages" - elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - STP="$HOME/.config/sublime-text/Packages" - else - STP="/c/st/Data/Packages/" - fi - else - if [ $(uname) = 'Darwin' ]; then - STP="$HOME/Library/Application Support/Sublime Text $SUBLIME_TEXT_VERSION/Packages" - elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - STP="$HOME/.config/sublime-text-$SUBLIME_TEXT_VERSION/Packages" - else - STP="/c/st/Data/Packages/" - fi - fi - echo "SUBLIME_TEXT_PACKAGES=$STP" >> $GITHUB_ENV - shell: bash - - name: Setup Sublime Text Path run: | if [ "${{ runner.os }}" = "Windows" ]; then echo "c:\st" >> $GITHUB_PATH else echo "$HOME/.local/bin" >> $GITHUB_PATH fi + case ${{ inputs.sublime-text-version }} in + 3) + case ${{ runner.os }} in + Linux) + STP="$HOME/.config/sublime-text-${{ inputs.sublime-text-version }}/Packages";; + macOS) + STP="$HOME/Library/Application Support/Sublime Text ${{ inputs.sublime-text-version }}/Packages";; + Windows) + STP="/c/st/Data/Packages/";; + *) + exit 1 + esac;; + 4) + case ${{ runner.os }} in + Linux) + STP="$HOME/.config/sublime-text/Packages";; + macOS) + STP="$HOME/Library/Application Support/Sublime Text/Packages";; + Windows) + STP="/c/st/Data/Packages/";; + *) + exit 1 + esac;; + *) + exit 1 + esac + echo "SUBLIME_TEXT_PACKAGES=$STP" >> $GITHUB_ENV + echo "SUBLIME_TEXT_ARCH=${{ inputs.sublime-text-arch }}" >> $GITHUB_ENV + echo "SUBLIME_TEXT_VERSION=${{ inputs.sublime-text-version }}" >> $GITHUB_ENV shell: bash - name: Setup Graphical User Interface if: runner.os == 'Linux' run: | sudo bash $GITHUB_ACTION_PATH/install_ubuntu_sys_req.sh echo "DISPLAY=:1" >> $GITHUB_ENV - - if [ "${{ inputs.display }}" = "xvfb" ]; then - sudo apt-get install xvfb - elif [ "${{ inputs.display }}" = "turbovnc" ]; then - wget https://phoenixnap.dl.sourceforge.net/project/turbovnc/2.2.5/turbovnc_2.2.5_amd64.deb - sudo dpkg -i turbovnc_2.2.5_amd64.deb - echo "/opt/TurboVNC/bin" >> $GITHUB_PATH - fi - if [ "${{ inputs.display }}" != "false" ]; then - if [ "${{ inputs.window-manager }}" = "xfce" ]; then - sudo apt-get install --no-install-recommends xfce4 xfce4-goodies dbus-x11 - elif [ "${{ inputs.window-manager }}" = "icewm" ]; then - sudo apt-get install icewm - elif [ "${{ inputs.window-manager }}" = "fluxbox" ]; then - sudo apt-get install fluxbox - fi - fi + # install display driver + case ${{ inputs.display }} in + xvfb) + sudo apt-get install xvfb ;; + turbovnc) + wget https://phoenixnap.dl.sourceforge.net/project/turbovnc/2.2.5/turbovnc_2.2.5_amd64.deb + sudo dpkg -i turbovnc_2.2.5_amd64.deb + echo "/opt/TurboVNC/bin" >> $GITHUB_PATH + esac + # install window manager + case ${{ inputs.window-manager }} in + fluxbox|icewm) + sudo apt-get install ${{ inputs.window-manager }} ;; + xfce) + sudo apt-get install --no-install-recommends xfce4 xfce4-goodies dbus-x11 ;; + esac shell: bash - name: Start Graphical User Interface if: runner.os == 'Linux' run: | - if [ "${{ inputs.display }}" = "xvfb" ]; then - Xvfb $DISPLAY -screen 0 1024x768x24 -ac +extension GLX +render -noreset & - sleep 1 - if [ "${{ inputs.window-manager }}" = "xfce" ]; then - nohup startxfce4 & - elif [ "${{ inputs.window-manager }}" = "icewm" ]; then - nohup icewm & - elif [ "${{ inputs.window-manager }}" = "fluxbox" ]; then - nohup fluxbox & - fi - elif [ "${{ inputs.display }}" = "turbovnc" ]; then - mkdir $HOME/.vnc - echo $RANDOM$RANDOM | vncpasswd -f > $HOME/.vnc/passwd - chmod 0600 $HOME/.vnc/passwd - if [ "${{ inputs.window-manager }}" = "xfce" ]; then - vncserver $DISPLAY -geometry 1024x768 -depth 24 -wm "startxfce4" - elif [ "${{ inputs.window-manager }}" = "false" ]; then - vncserver $DISPLAY -geometry 1024x768 -depth 24 - else - vncserver $DISPLAY -geometry 1024x768 -depth 24 -wm "${{ inputs.window-manager }}" - fi - fi - shell: bash - - name: Install Sublime Text - if: runner.os == 'Linux' || runner.os == 'macOS' - run: | - bash $GITHUB_ACTION_PATH/install_sublime_text.sh + case ${{ inputs.display }} in + xvfb) + Xvfb $DISPLAY -screen 0 1024x768x24 -ac +extension GLX +render -noreset & + sleep 1 + case ${{ inputs.window-manager }} in + fluxbox|icewm) + nohup ${{ inputs.window-manager }} & ;; + xfce) + nohup startxfce4 & ;; + esac ;; + turbovnc) + mkdir $HOME/.vnc + echo $RANDOM$RANDOM | vncpasswd -f > $HOME/.vnc/passwd + chmod 0600 $HOME/.vnc/passwd + case ${{ inputs.window-manager }} in + false) + vncserver $DISPLAY -geometry 1024x768 -depth 24 ;; + fluxbox|icewm) + vncserver $DISPLAY -geometry 1024x768 -depth 24 -wm "${{ inputs.window-manager }}" ;; + xfce) + vncserver $DISPLAY -geometry 1024x768 -depth 24 -wm "startxfce4" ;; + esac + esac shell: bash - name: Install Sublime Text - if: runner.os == 'Windows' - run: | - pwsh $Env:GITHUB_ACTION_PATH/install_sublime_text.ps1 --verbose - shell: pwsh - - name: Confugure Git run: | - # Disable warnings about detached HEAD - # https://stackoverflow.com/questions/36794501 - git config --global advice.detachedHead false - + # download and install Sublime Text + if [ "${{ runner.os }}" = "Windows" ]; then + pwsh $GITHUB_ACTION_PATH/install_sublime_text.ps1 --verbose; + else + bash $GITHUB_ACTION_PATH/install_sublime_text.sh; + fi # block sublime text website ip bash $GITHUB_ACTION_PATH/block_ip.sh shell: bash @@ -179,6 +174,10 @@ runs: shell: bash - name: Install Packages run: | + # Disable warnings about detached HEAD + # https://stackoverflow.com/questions/36794501 + git config --global advice.detachedHead false + . $GITHUB_ACTION_PATH/utils.sh # Copy plugin files to Packages/ folder if files are checked out. @@ -221,12 +220,11 @@ runs: fi shell: bash - name: Install Package Control - if: (runner.os == 'Linux' || runner.os == 'macOS') && inputs.install-package-control == 'true' + if: inputs.install-package-control == 'true' run: | - bash $GITHUB_ACTION_PATH/install_package_control.sh + if [ "${{ runner.os }}" = "Windows" ]; then + pwsh $GITHUB_ACTION_PATH/install_package_control.ps1 --verbose; + else + bash $GITHUB_ACTION_PATH/install_package_control.sh; + fi shell: bash - - name: Install Package Control - if: runner.os == 'Windows' && inputs.install-package-control == 'true' - run: | - pwsh $Env:GITHUB_ACTION_PATH/install_package_control.ps1 --verbose - shell: pwsh From 15ce0268a4edffbfa082e882835af43bc6640788 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 6 Apr 2024 20:49:20 +0200 Subject: [PATCH 8/8] On demand download Package Control This commit prevents Package Control.sublime-package from being downloaded and installed, if Package Control folder already exists as extracted package. This may be the case if it is the package to test or was installed via `extra-packages` input. --- actions/setup/install_package_control.ps1 | 2 +- actions/setup/install_package_control.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/setup/install_package_control.ps1 b/actions/setup/install_package_control.ps1 index d3ee41df..affed857 100644 --- a/actions/setup/install_package_control.ps1 +++ b/actions/setup/install_package_control.ps1 @@ -13,7 +13,7 @@ $STPU = "C:\st\Data\Packages\User" New-Item -itemtype directory $STPU -force >$null $PC_PATH = "$STIP\Package Control.sublime-package" -if (-not (Test-Path $PC_PATH)) { +if (-not (Test-Path $PC_PATH) -and -not (Test-Path "$STP\Package Control")) { Write-Verbose "Downloading Package Control.sublime-package" $PC_URL = "https://github.com/wbond/package_control/releases/latest/download/Package.Control.sublime-package" (New-Object System.Net.WebClient).DownloadFile($PC_URL, $PC_PATH) diff --git a/actions/setup/install_package_control.sh b/actions/setup/install_package_control.sh index b4414827..7144a2ab 100644 --- a/actions/setup/install_package_control.sh +++ b/actions/setup/install_package_control.sh @@ -42,7 +42,7 @@ if [ ! -d "$STIP" ]; then fi PC_PATH="$STIP/Package Control.sublime-package" -if [ ! -f "$PC_PATH" ]; then +if [ ! -f "$PC_PATH" ] && [ ! -d "$STP/Package Control" ]; then echo Downloading Package Control.sublime-package PC_URL="https://github.com/wbond/package_control/releases/latest/download/Package.Control.sublime-package" curl -s -L "$PC_URL" -o "$PC_PATH"