pp-covidcert

Vaccination Certificate fpor the EU
git clone https://src.jayvii.de/pub/pp-covidcert.git
Log | Files | Refs

commit cd9a7f0a8cefe73407b9317c73598c5a7bcaf6b5
parent 0c9d5866b166519a87ed9735c10c2586562f7809
Author: JayVii <jayvii@posteo.de>
Date:   Mon,  4 Oct 2021 14:46:30 +0200

support config file

Diffstat:
Minstall.sh | 28++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/install.sh b/install.sh @@ -6,15 +6,25 @@ cd $(dirname $0) make install # replace variables in script -echo "What's your Name?" -read name -echo "What's your Date of Birth?" -read dob -echo "When was your first vaccination?" -read firstvac -echo "When was your second vaccination?" -read secondvac +if [ ! -f "$HTML_PATH/config" ]; then + echo "What's your Name?" + read name + echo "What's your Date of Birth?" + read dob + echo "When was your first vaccination?" + read firstvac + echo "When was your second vaccination?" + read secondvac + # write config file + echo "name=\"$name\"" > "$HTML_PATH/config" + echo "dob=\"$dob\"" >> "$HTML_PATH/config" + echo "firstvac=\"$firstvac\"" >> "$HTML_PATH/config" + echo "secondvac=\"$secondvac\"" >> "$HTML_PATH/config" +else + source "$HTML_PATH/config" +fi +# fill in HTML file sed -e "s/<!--NAME-->/$name/g" \ -e "s/<!--DOB-->/$dob/g" \ -e "s/<!--FIRSTVAC-->/$firstvac/g" \ @@ -25,9 +35,11 @@ sed -e "s#<!--CERT1-->#$HTML_PATH/cert1.png#g" \ -e "s#<!--CERT2-->#$HTML_PATH/cert2.png#g" \ -i "$HTML_PATH/index.html" +# fill in .desktop file sed -e "s#\$HOME#$HOME#g" \ -i "$HOME/.local/share/applications/pp-covidcert.desktop" +# user output echo "Please put your QR-Code's under:" echo "- $HTML_PATH/cert1.png" echo "- $HTML_PATH/cert2.png"