Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/misc/licensed-download.sh
blob: 192091e0acad25e2e40b424b84e1922d696e7ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

set -e

if [ ! -f _temp/licensed-3.3.1.done ]; then
  echo 'Clearing temp'
  rm -rf _temp/licensed-3.3.1 || true

  echo 'Downloading licensed'
  mkdir -p _temp/licensed-3.3.1
  pushd _temp/licensed-3.3.1
  if [[ "$OSTYPE" == "darwin"* ]]; then
    curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-darwin-x64.tar.gz
  else
    curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-linux-x64.tar.gz
  fi

  echo 'Extracting licenesed'
  tar -xzf licensed.tar.gz
  popd
  touch _temp/licensed-3.3.1.done
else
  echo 'Licensed already downloaded'
fi