fdroid, fix prep message and also variablize the files being used multiple times.
This commit is contained in:
1 parent
db1c85db20
commit
fd8f9839ab
1 file changed
+15
-9
@@ -6,26 +6,32 @@
|
||||
## Setup ##
|
||||
|
||||
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
source $DIR/.env
|
||||
env="$DIR"/.env
|
||||
if [[ ! -f "$env" ]]; then
|
||||
cp -v "$DIR"/example.env "$env"
|
||||
fi
|
||||
source "$env"
|
||||
|
||||
## Main ##
|
||||
|
||||
# Create folders.
|
||||
mkdir -pv $FDROID_DATA
|
||||
|
||||
if [[ ! -f files/leystore.p12 ]]; then
|
||||
keystore="$DIR"/files/keystore.p12
|
||||
if [[ ! -f "$keystore" ]]; then
|
||||
echo "ERROR: Keystore not detected. Please create it using 'keytool', like this:"
|
||||
cat <<- EOF
|
||||
|
||||
keytool -genkeypair -v \
|
||||
-storetype PKCS12 \
|
||||
-keystore keystore.p12 \
|
||||
-alias fdroid \
|
||||
-keyalg RSA -keysize 4096 \
|
||||
-validity 10000 \
|
||||
-dname "CN=TEST, OU=F-Droid"
|
||||
keytool -genkeypair -v \\
|
||||
-storetype PKCS12 \\
|
||||
-keystore keystore.p12 \\
|
||||
-alias fdroid \\
|
||||
-keyalg RSA -keysize 4096 \\
|
||||
-validity 10000 \\
|
||||
-dname "CN=YourName, OU=F-Droid"
|
||||
|
||||
EOF
|
||||
echo "It will ask for passwords, it's recommended to make them both the same."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user