summary refs log tree commit diff stats
path: root/.github/workflows/shellcheck.yml
blob: 0d10cf618ba9b816f207c73ea5376d5d50055bb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
name: Shellcheck scope.sh

on: 
  push:
    paths:
      - '.github/workflows/shellcheck.yml'
      - 'ranger/data/scope.sh'

jobs:
  test_shellcheck:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
      with:
        fetch-depth: 1
    - name: Install newer shellcheck (0.7.0 rather than 0.4.6)
      run: |
        curl -LO "https://storage.googleapis.com/shellcheck/shellcheck-stable.linux.x86_64.tar.xz"
        tar xf shellcheck-stable.linux.x86_64.tar.xz
    - name: Shellcheck scope.sh
      run: |
        env PATH=shellcheck-stable:$PATH make test_shellcheck
pan class="k">case $os in # Not sure about uname output on DragonFly BSD. *openbsd* | *linux* | *freebsd* | *netbsd* | *dragonfly* | *dragonflybsd* | *darwin* ) ;; *) echo "Pre-built binary not available for your os" exit 1 ;; esac cpu=`uname -m` cpu=`echo $cpu | tr "[:upper:]" "[:lower:"]` case $cpu in *amd*64* | *x86*64* ) ;; *) echo "Pre-built binary not available for your cpu" exit 1 ;; esac } getURL(){ url="https://archive.org/download/cetus-v0.6.4/cetus-v0.6.4-$os-$cpu" } printURL(){ echo "You can get the Pre-built binary here:" echo "$url" echo echo "Run these commands to install it on your device." echo "# curl -L -o /usr/local/bin/cetus $url" echo "# chmod +x /usr/local/bin/cetus" echo echo "This is sha256 hash for cetus built for: $os $cpu" case $os in *openbsd* ) echo "$openbsdH" ;; *netbsd* ) echo "$netbsdH" ;; *dragonflybsd* | *dragonfly* ) echo "$dragonflyH" ;; *darwin* ) echo "$darwinH" ;; *freebsd* ) echo "$freebsdH" ;; *linux* ) echo "$linuxH" ;; esac echo echo "Verify the hash by running sha256 on cetus binary." echo "$ sha256 /usr/local/bin/cetus" } echo "Cetus v0.6.4" echo earlyCheck getURL printURL