Omaha #3690 added tool to remove empty localization dirs

Change-Id: Id5ec16147d9f159fa17645da79d29d1f5cbaa701

Former-commit-id: 090a787f8d [formerly f39ffcc63f] [formerly 090a787f8d [formerly f39ffcc63f] [formerly 81c73519c2 [formerly a69773742e571a334ef1fd000ff8311805f9c737]]]
Former-commit-id: 81c73519c2
Former-commit-id: 260b3bab88 [formerly c3d7cd6e7f]
Former-commit-id: 639b2c2510
This commit is contained in:
Brian Clements 2014-10-06 15:01:18 -05:00
parent 763e75f35b
commit 49bb8437f6

View file

@ -0,0 +1,20 @@
#!/bin/bash
# Omaha #3690: Finds empty localization directories and deletes them with the
# '-d' flag. This can improve performance in some areas of the system.
if [[ $1 == '-d' ]]
then
echo "Delete all directory trees that don't contain regular files? [y/n]"
read answer
if [[ $answer == 'y' || $answer == 'Y' ]]
then
DEL_OPTS='-delete -print'
echo "Deleting the following directories"
else
echo "Aborting"
exit 1
fi
fi
find /awips2/edex/data/utility -type d -empty $DEL_OPTS