arch="$(uname -m)"
if [ "$arch" = "x86_64" ]; then
arch="amd64"
- elif [ "$arch" = "armv7l" ]; then
- arch="arm"
elif [ "$arch" = "aarch64" ]; then
arch="arm64"
else
done
RELEASE_ROOT=$(dirname "$SCRIPTPATH")
- uri="https://git.pleroma.social"
+ uri="https://akkoma-updates.s3-website.fr-par.scw.cloud"
project_id="2"
project_branch="${BRANCH:-$(detect_branch)}"
flavour="${FLAVOUR:-$(detect_flavour)}"
tmp="${TMP_DIR:-/tmp}"
artifact="$tmp/pleroma.zip"
- full_uri="${FULL_URI:-${uri}/api/v4/projects/${project_id}/jobs/artifacts/${project_branch}/download?job=${flavour}}"
+ full_uri="${FULL_URI:-${uri}/${project_branch}/akkoma-${flavour}}.zip"
echo "Downloading the artifact from ${full_uri} to ${artifact}"
curl "$full_uri" -o "${artifact}"
echo "Unpacking ${artifact} to ${tmp}"
FULL_ARGS="$*"
ACTION="$1"
- shift
-
- if [ "$(echo \"$1\" | grep \"^-\" >/dev/null)" = false ]; then
- SUBACTION="$1"
+ if [ $# -gt 0 ]; then
shift
fi
+ echo "$1" | grep "^-" >/dev/null
+ if [ $? -eq 1 ]; then
+ SUBACTION="$1"
+ if [ $# -gt 0 ]; then
+ shift
+ fi
+ fi
if [ "$ACTION" = "update" ]; then
update "$@"