summaryrefslogtreecommitdiff
path: root/ModSlots/cleanup_nativePC.sh
blob: d2d4341811330efeb1cbb783c8a6fe746f4552d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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