From c4a5e9d8c92252fbdcef18cac0d9e5572cc57b85 Mon Sep 17 00:00:00 2001 From: SuhEugene <32931701+SuhEugene@users.noreply.github.com> Date: Fri, 16 Jun 2023 02:59:33 +0300 Subject: [PATCH] `$HOME` -> `~` --- .github/workflows/generate_documentation.yml | 2 +- .github/workflows/test.yml | 10 +++++----- install-byond.sh | 6 +++--- scripts/install-spaceman-dmm.sh | 10 +++++----- test/run-test.sh | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/generate_documentation.yml b/.github/workflows/generate_documentation.yml index b8359e900bba7..b7d8357771a44 100644 --- a/.github/workflows/generate_documentation.yml +++ b/.github/workflows/generate_documentation.yml @@ -41,7 +41,7 @@ jobs: - name: Setup Cache uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: - path: $HOME/spaceman_dmm/$SPACEMAN_DMM_VERSION + path: ~/spaceman_dmm/${{ env.SPACEMAN_DMM_VERSION }} key: ${{ runner.os }}-spacemandmm-${{ env.SPACEMAN_DMM_VERSION }} - name: Install dmdoc run: scripts/install-spaceman-dmm.sh dmdoc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5a6b1859da9e..cf4601b6b8151 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Cache uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: - path: $HOME/spaceman_dmm/$SPACEMAN_DMM_VERSION + path: ~/spaceman_dmm/${{ env.SPACEMAN_DMM_VERSION }} key: ${{ runner.os }}-spacemandmm-${{ env.SPACEMAN_DMM_VERSION }} - name: Install Dreamchecker run: scripts/install-spaceman-dmm.sh dreamchecker @@ -63,7 +63,7 @@ jobs: - name: Setup Cache uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: - path: $HOME/BYOND-$BYOND_MAJOR.$BYOND_MINOR + path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }} key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} - name: Install Dependencies run: sudo apt-get install -y uchardet @@ -93,7 +93,7 @@ jobs: - name: Setup Cache uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: - path: $HOME/BYOND-$BYOND_MAJOR.$BYOND_MINOR + path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }} key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} - name: Run Tests env: @@ -122,7 +122,7 @@ jobs: - name: Setup Cache uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: - path: $HOME/BYOND-$BYOND_MAJOR.$BYOND_MINOR + path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }} key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} - name: Run Tests env: @@ -151,7 +151,7 @@ jobs: - name: Setup Cache uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: - path: $HOME/BYOND-$BYOND_MAJOR.$BYOND_MINOR + path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }} key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} - name: Run Tests env: diff --git a/install-byond.sh b/install-byond.sh index 3b0170c16b0f6..70ade45fb6ecf 100755 --- a/install-byond.sh +++ b/install-byond.sh @@ -1,12 +1,12 @@ #!/bin/sh set -e -if [ -f "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/DreamMaker" ]; +if [ -f ~/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/DreamMaker ]; then echo "Using cached directory." else echo "Setting up BYOND." - mkdir -p "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}" - cd "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}" + mkdir -p ~/BYOND-${BYOND_MAJOR}.${BYOND_MINOR} + cd ~/BYOND-${BYOND_MAJOR}.${BYOND_MINOR} echo "Installing DreamMaker to $PWD" curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip unzip -o byond.zip diff --git a/scripts/install-spaceman-dmm.sh b/scripts/install-spaceman-dmm.sh index ccb544bcedfac..7321d4817480a 100755 --- a/scripts/install-spaceman-dmm.sh +++ b/scripts/install-spaceman-dmm.sh @@ -1,15 +1,15 @@ #!/bin/bash set -euo pipefail -if [ -f "$HOME/spaceman_dmm/$SPACEMAN_DMM_VERSION/$1" ]; +if [ -f ~/spaceman_dmm/$SPACEMAN_DMM_VERSION/$1 ]; then echo "Using cached $1." - cp "$HOME/spaceman_dmm/$SPACEMAN_DMM_VERSION/$1" ~/$1 + cp ~/spaceman_dmm/$SPACEMAN_DMM_VERSION/$1 ~/$1 else wget -O ~/$1 "https://github.com/SpaceManiac/SpacemanDMM/releases/download/$SPACEMAN_DMM_VERSION/$1" - mkdir -p $HOME/spaceman_dmm - cp ~/$1 $HOME/spaceman_dmm/$SPACEMAN_DMM_VERSION + mkdir -p ~/spaceman_dmm + cp ~/$1 ~/spaceman_dmm/$SPACEMAN_DMM_VERSION fi chmod +x ~/$1 -~/$1 --version \ No newline at end of file +~/$1 --version diff --git a/test/run-test.sh b/test/run-test.sh index fb7e655bf7091..dd060b1b1de9f 100755 --- a/test/run-test.sh +++ b/test/run-test.sh @@ -225,7 +225,7 @@ function run_byond_tests { if [[ "$CI" == "true" ]]; then msg "installing BYOND" ./install-byond.sh || exit 1 - source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup + source ~/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup fi run_test "build map unit tests" "scripts/dm.sh -DUNIT_TEST -M$MAP_PATH baystation12.dme" run_test "check no warnings in build" "grep ', 0 warnings' build_log.txt"