commit f7e946950aa8f780d07afcf7b1471e15db96f344
parent 6731d28548d38acaef5bd83c98f287b46457e2d4
Author: xfnw <xfnw@ttm.sh>
Date: Sun, 18 Oct 2020 12:16:07 -0400
why did the total have a bunch of spaces lol what
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xfwc b/xfwc
@@ -21,7 +21,7 @@ rm index.html
ln -s $TOTAL.html index.html
-NUM=$TOTAL
+NUM=$(( TOTAL ))
for fn in $(ls -t src); do
NEWF=$NUM.html
TITLE=$(echo ${fn%????} | sed 's/_/ /g' | sed -e 's/[]$.*[\^]/\\&/g')
@@ -45,7 +45,7 @@ sed -i "s/XFSSTITLE/$TITLE/g" $NEWF
sed -i "s/RANDOM/"$(( ( RANDOM % TOTAL ) + 1 ))"/" $NEWF
-sed -i "s/LAST/"$TOTAL"/" $NEWF
+sed -i "s/LAST/$TOTAL/" $NEWF
[ "$NUM" = "1" ] || sed -i "s/PRE/"$(( NUM - 1 ))"/" $NEWF