update skeleton

Tá an tiomantas seo le fáil i:
Florian Brinker
2019-10-13 02:40:29 +02:00
tuismitheoir fe5f9caca4
tiomantas c1ecdac17e
D'athraigh 3 comhad le 114 breiseanna agus 0 scriosta

23
scripts/create-secrets-skel.sh Comhad infheidhmithe
Féach ar an gComhad

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
DIR=$(dirname "$(readlink -f "$0")")
SECRETS_FILE="$DIR/../secrets.yaml"
SKEL_FILE="$SECRETS_FILE.skel"
if [ ! -f $SECRETS_FILE ]; then
echo "File missing: \"$SECRETS_FILE\""
exit 1
fi
touch $SKEL_FILE
echo "" > $SKEL_FILE
while read LINE; do
# do nothing with empty lines
if [[ $LINE = *:* ]]; then
LINE="${LINE%%:*}: "
fi
echo "$LINE" >> $SKEL_FILE
done < $SECRETS_FILE