summaryrefslogtreecommitdiff
path: root/ModSlots/cleanup_nativePC.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ModSlots/cleanup_nativePC.sh')
-rwxr-xr-xModSlots/cleanup_nativePC.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/ModSlots/cleanup_nativePC.sh b/ModSlots/cleanup_nativePC.sh
new file mode 100755
index 0000000..d2d4341
--- /dev/null
+++ b/ModSlots/cleanup_nativePC.sh
@@ -0,0 +1,16 @@
+#! /usr/bin/env sh
+
+if [[ $(basename "$PWD") != "nativePC" ]]; then
+ echo "This should only be run from the 'Monster Hunter World/nativePC' directory."
+ exit 1
+fi
+
+if [[ "$1" == "print" ]]; then
+ find . -depth -type d -empty -print | grep .
+else
+ find . -depth -type d -empty -print -delete | grep .
+fi
+
+if [[ $? != 0 ]]; then
+ echo "No empty directories found."
+fi