shell-host/lang/node/node.lib
David Kebler f4d2fe1c08 ignored archive
refactor docker
added languages
added/refactor btrbk library
added sudoers
2023-12-14 17:29:19 -08:00

16 lines
No EOL
438 B
Bash
Executable file

#!/bin/bash
module_load confirm
rm_node_modules () {
parent=${1:-$PWD}
echo finding node_modules folders within $parent
if command find . -name 'node_modules' -type d -prune 2>/dev/null;then
confirm continue with deleting? || return 1
command find . -name 'node_modules' -type d -prune -exec rm -r '{}' +
else
echo no folders to delete
fi
}
# if script was executed then call the function
(return 0 2>/dev/null) || rm_node_modules $@