Skip to content

Commit

Permalink
freebsd tail support
Browse files Browse the repository at this point in the history
  • Loading branch information
goblinhack committed Jan 8, 2025
1 parent 18716ea commit 4a2415e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/list_monsters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi

sed -i 's/<newline>/<br \/>/g' $PAYLOAD
sed "1,/begin monsters type marker/!d" $IN > $PRE
sed "/end monsters type marker/,\$!d" $IN | tail -n +1 - > $POST
sed "/end monsters type marker/,\$!d" $IN | tail -n +1 > $POST

cat $PRE $PAYLOAD $POST > $OUT
diff $IN $OUT
Expand Down
2 changes: 1 addition & 1 deletion build/list_types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sort -r -n +1 $PAYLOAD > $TMP
mv $TMP $PAYLOAD

sed "1,/begin type marker/!d" $IN > $PRE
sed "/end type marker/,\$!d" $IN | tail -n +1 - > $POST
sed "/end type marker/,\$!d" $IN | tail -n +1 > $POST

cat $PRE $PAYLOAD $POST > $OUT
diff $IN $OUT
Expand Down
2 changes: 1 addition & 1 deletion build/list_weapons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi

sed -i 's/<newline>/<br \/>/g' $PAYLOAD
sed "1,/begin weapons type marker/!d" $IN > $PRE
sed "/end weapons type marker/,\$!d" $IN | tail -n +1 - > $POST
sed "/end weapons type marker/,\$!d" $IN | tail -n +1 > $POST

cat $PRE $PAYLOAD $POST > $OUT
diff $IN $OUT
Expand Down
4 changes: 2 additions & 2 deletions build/tidy_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ do
fi

sed '1,/begin sort marker/!d' $IN > $PRE
sed '/begin sort marker/,/end sort marker/!d' $IN | tail -n +1 - | grep -v "sort marker" | sort > $PAYLOAD
sed '/end sort marker/,$!d' $IN | tail -n +1 - > $POST
sed '/begin sort marker/,/end sort marker/!d' $IN | tail -n +1 | grep -v "sort marker" | sort > $PAYLOAD
sed '/end sort marker/,$!d' $IN | tail -n +1 > $POST

sort $PAYLOAD | uniq > $PAYLOAD.tmp
mv $PAYLOAD.tmp $PAYLOAD
Expand Down
4 changes: 2 additions & 2 deletions build/tidy_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ do
for WHICH in 1 2 3 4 5 6 7 8 9
do
sed "1,/begin sort marker${WHICH}/!d" $IN > $PRE
sed "/begin sort marker${WHICH}/,/end sort marker${WHICH}/!d" $IN | tail -n +1 - | grep -v "sort marker" | sort > $PAYLOAD
sed "/end sort marker${WHICH}/,\$!d" $IN | tail -n +1 - > $POST
sed "/begin sort marker${WHICH}/,/end sort marker${WHICH}/!d" $IN | tail -n +1 | grep -v "sort marker" | sort > $PAYLOAD
sed "/end sort marker${WHICH}/,\$!d" $IN | tail -n +1 > $POST
sort $PAYLOAD | uniq > $PAYLOAD.tmp
mv $PAYLOAD.tmp $PAYLOAD
cat $PRE $PAYLOAD $POST > $OUT
Expand Down

0 comments on commit 4a2415e

Please sign in to comment.