Move scripts dir inside hm

And remove weird path contraptions
This commit is contained in:
Geoffrey Frogeye 2023-11-30 22:09:44 +01:00
parent 050901da2f
commit edeef96133
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
49 changed files with 2 additions and 11 deletions

18
hm/scripts/cleandev Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p bash findutils git gnumake
# Removes files that can be regenerated
# from a dev environment
find . -type d -name bower_components -or -name node_modules -print0 | while read file; do
rm -rf "$file"
done
find . -type f -name Makefile -print0 | while IFS= read -r -d '' file; do
echo "--> $file"
(cd "${file//Makefile}"; make clean)
done
find . -type d -name .git -print0 | while IFS= read -r -d '' dir; do
echo "--> $file"
(cd "$dir"; git gc)
done