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 ##
|
## Setup ##
|
||||||
|
|
||||||
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
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 ##
|
## Main ##
|
||||||
|
|
||||||
# Create folders.
|
# Create folders.
|
||||||
mkdir -pv $FDROID_DATA
|
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:"
|
echo "ERROR: Keystore not detected. Please create it using 'keytool', like this:"
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
|
|
||||||
keytool -genkeypair -v \
|
keytool -genkeypair -v \\
|
||||||
-storetype PKCS12 \
|
-storetype PKCS12 \\
|
||||||
-keystore keystore.p12 \
|
-keystore keystore.p12 \\
|
||||||
-alias fdroid \
|
-alias fdroid \\
|
||||||
-keyalg RSA -keysize 4096 \
|
-keyalg RSA -keysize 4096 \\
|
||||||
-validity 10000 \
|
-validity 10000 \\
|
||||||
-dname "CN=TEST, OU=F-Droid"
|
-dname "CN=YourName, OU=F-Droid"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
echo "It will ask for passwords, it's recommended to make them both the same."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user