Skip to content

Commit

Permalink
Clean up by ext, use emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed May 22, 2024
1 parent c506849 commit 0290a68
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function build {
}

echo
echo "Rebuilding forest"
echo "Rebuilding forest"
time build
echo

Expand Down
24 changes: 14 additions & 10 deletions build_changed.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/bash

while IFS= read -r line; do
# IFS=':' read -ra ADDR <<< "$line"
# echo "File ${ADDR[0]} changed"
# if line begins with "other:"
# if [[ $line == other:* ]]; then
# # echo "Other event: $line"
# continue
# fi

echo "Event: $line"
./build.sh
IFS=':' read -ra ADDR <<< "$line"
EVENT="${ADDR[0]}"
CHANGED_FILE="${ADDR[1]}"
echo "$EVENT: $CHANGED_FILE"
if [[ $CHANGED_FILE == *".css" ]] || [[ $CHANGED_FILE == *".js" ]] || [[ $CHANGED_FILE == *".xsl" ]]; then
echo "🛁 Cleaning up build and output"
rm -rf build
rm -rf output
./build.sh
elif [[ $CHANGED_FILE == *".tree" ]] || [[ $CHANGED_FILE == *".tex" ]]; then
./build.sh
else
echo "🤷 No action for $LINE"
fi
done
1 change: 1 addition & 0 deletions watch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

echo "🛁 Cleaning up build and output"
rm -rf build
rm -rf output
./build.sh
Expand Down

0 comments on commit 0290a68

Please sign in to comment.