Add option to specify the version manually. Update docs.

This commit is contained in:
Josh Mudge 2018-06-28 15:02:19 -06:00
parent 91f4ecd3f8
commit 20fb4b7dfe
2 changed files with 25 additions and 4 deletions

View File

@ -14,6 +14,8 @@ You can download and run the installer script:
`curl -fsSL https://git.coolaj86.com/coolaj86/gitea-installer.sh/raw/branch/master/install.bash | bash` `curl -fsSL https://git.coolaj86.com/coolaj86/gitea-installer.sh/raw/branch/master/install.bash | bash`
You can pick a specific version to install. For example, if you were nostalgic for 1.2.0, you could run `curl -fsSL https://git.coolaj86.com/coolaj86/gitea-installer.sh/raw/branch/master/install.bash | bash -s version 1.2.0`
## Install Manually ## Install Manually
Or manually install by reading these instructions and following along: Or manually install by reading these instructions and following along:

25
install.bash Normal file → Executable file
View File

@ -6,9 +6,28 @@ VER=$(curl --silent "https://api.github.com/repos/go-gitea/gitea/releases/latest
sed -E 's/.*"([^"]+)".*/\1/' | # Pluck JSON value sed -E 's/.*"([^"]+)".*/\1/' | # Pluck JSON value
sed 's|[v,]||g' ) # Remove v sed 's|[v,]||g' ) # Remove v
# wget -O install-gitea.bash https://git.coolaj86.com/coolaj86/gitea-installer/raw/master/install.bash; bash install-gitea.bash while [[ $# -gt 0 ]]
# or do
# wget -O - https://git.coolaj86.com/coolaj86/gitea-installer/raw/master/install.bash | bash key="$1"
case $key in
-v|version)
VER="$2"
shift # past argument
;;
*)
# unknown option
if test -z "${unknown}"
then
unknown=$1
else
echo "Unknown Option"
exit 1
fi
;;
esac
shift # past argument or value
done
# Create a 'gitea' user and group with the home /opt/gitea, no password (because it's a system user) and no GECOS # Create a 'gitea' user and group with the home /opt/gitea, no password (because it's a system user) and no GECOS
sudo adduser gitea --home /opt/gitea --disabled-password --gecos '' sudo adduser gitea --home /opt/gitea --disabled-password --gecos ''