2 # homepage: https://github.com/go-gitea/gitea
3 # tagline: a modern drop-in grep replacement
5 # `gitea` is a clean, lightweight self-hosted Github alternative, forked from Gogs. Lighter and more user-friendly than Gitlab.
19 new_gitea="${HOME}/.local/bin/gitea"
21 # Test for existing version
23 cur_gitea="$(command -v gitea)"
25 if [ -n "$cur_gitea" ]; then
26 cur_ver=$(gitea --version | head -n 1 | cut -d ' ' -f 3)
27 if [ "$cur_ver" == "$WEBI_VERSION" ]; then
28 echo "gitea v$WEBI_VERSION already installed at $cur_gitea"
30 elif [ "$cur_gitea" != "$new_gitea" ]; then
31 echo "WARN: possible conflict with gitea v$WEBI_VERSION at $cur_gitea"
35 # Note: this file is `source`d by the true installer and hence will have the webi functions
37 # because we created releases.js we can use webi_download()
38 # downloads gitea to ~/Downloads
41 # because this is tar or zip, we can webi_extract()
42 # extracts to the WEBI_TMP directory, raw (no --strip-prefix)
45 pushd "$WEBI_TMP" 2>&1 >/dev/null
46 echo Installing gitea v${WEBI_VERSION} as "$new_gitea"
47 mv ./gitea-* "$HOME/.local/bin/gitea"
48 chmod a+x "$HOME/.local/bin/gitea"
55 # TODO get better output from pathman / output the path to add as return to webi bootstrap
56 webi_path_add "$HOME/.local/bin"
58 echo "Installed 'gitea'"