diff --git a/issues/tools/make_issue.sh b/issues/tools/make_issue.sh index 38ca9f9..122b3b2 100755 --- a/issues/tools/make_issue.sh +++ b/issues/tools/make_issue.sh @@ -22,9 +22,14 @@ DIR=$(basename $1) DESTFILENAME=$2 CURINODE=$(stat -f "%i" current/) +LNSFX="" +if [ -n "$LN" ]; then + LNSFX="${LN}_" +fi + test -d "$DIR" || usage test -d ../public/ || die "You must run this from openbsd-webzine/current" -ls $DIR/*.html 2>&1 >/dev/null || die "no html file in $DIR" +ls $DIR/${LNSFX}*.html 2>&1 >/dev/null || die "no ${LN} html file in $DIR" . ./${DIR}/metadata.sh @@ -37,10 +42,10 @@ fi if test -z "$DESTFILENAME" then - DESTFILENAME="../${DEST}/${DIR}.html" + DESTFILENAME="../${DEST}/${LNSFX}${DIR}.html" fi -cat _common/header $DIR/*html _common/footer > $DESTFILENAME +cat _common/header $DIR/${LNSFX}*html _common/footer > $DESTFILENAME if echo $DIR | grep issue then @@ -65,6 +70,6 @@ else # index.html changes sed -i "s/ #__ISSUE__//g" $DESTFILENAME sed -i "s/__TITLE__/homepage/g" $DESTFILENAME - sed -i "s/__FILENAME__/index.html/" $DESTFILENAME + sed -i "s/__FILENAME__/${LNSFX}index.html/" $DESTFILENAME fi