Skip to content
Snippets Groups Projects
build-apk.sh 443 B
Newer Older
poka's avatar
poka committed
#!/bin/bash

poka's avatar
poka committed
[[ -z $1 ]] && echo "Please choose a version." && exit 1

poka's avatar
poka committed
flutter build apk --split-per-abi

poka's avatar
poka committed
APPNAME="gecko"
VERSION="$1"
ori_app="app.apk"

if [[ -d $HOME/Téléchargements ]]; then
    DL="$HOME/Téléchargements"
elif [[ -d $HOME/Downloads ]]; then
    DL="$HOME/Downloads"
else
    DL="/tmp"
fi

poka's avatar
poka committed
appPath="$DL/${APPNAME}-${VERSION}.apk"
mv build/app/outputs/flutter-apk/$ori_app "$appPath" && echo "$appPath" || exit 1