why did the total have a bunch of spaces lol what

This commit is contained in:
xfnw 2020-10-18 12:16:07 -04:00
parent 6731d28548
commit f7e946950a

4
xfwc
View file

@ -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