commit 6cce19af586d60c335a55349f647e67cf8c9f54b
parent ae167efd05653453c25257b6d09f6817b34b28d7
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 23 Nov 2026 22:06:00 +0300
fix: cleanup and generalize output naming
Diffstat:
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,13 +1,12 @@
.POSIX:
-SH = sh
UPLOAD = ${HOME}/bin/upload
-OUTPUT = adc
+OUTPUT ?= $(USER)
all: ${OUTPUT}.vcf
${OUTPUT}.vcf: contact-qr.sh
- ${SH} contact-qr.sh
+ ./contact-qr.sh ${OUTPUT}
upload: all
${UPLOAD} ${OUTPUT}.vcf ${OUTPUT}.png ${OUTPUT}.svg
diff --git a/contact-qr.sh b/contact-qr.sh
@@ -1,4 +1,3 @@
-
#!/bin/sh
set -eu
@@ -14,9 +13,8 @@ EMAIL="andam@geus.dk"
WEBSITE="https://andersdamsgaard.dk"
LINKEDIN="https://www.linkedin.com/in/anders-damsgaard-225075261/"
-OUTPUT="adc"
+OUTPUT="${1:-$USER}"
-# Verify dependency
if ! command -v qrencode >/dev/null 2>&1; then
echo "Error: qrencode is required" >&2
exit 1
@@ -39,15 +37,8 @@ fi
printf 'END:VCARD\r\n'
} > "${OUTPUT}.vcf"
-# Generate QR code
qrencode -t PNG -s 10 -m 4 -l M \
-o "${OUTPUT}.png" < "${OUTPUT}.vcf"
-# Generate SVG for vector graphics
qrencode -t SVG -m 4 -l M \
-o "${OUTPUT}.svg" < "${OUTPUT}.vcf"
-
-echo "Generated:"
-echo " ${OUTPUT}.vcf"
-echo " ${OUTPUT}.png"
-echo " ${OUTPUT}.svg"