2016-12-09 08:48:54 -05:00
|
|
|
#!/usr/bin/env bash
|
2017-09-20 08:51:58 -04:00
|
|
|
#
|
2017-07-21 04:18:47 -04:00
|
|
|
# This script deletes *.svg files from the directory
|
2016-12-09 08:48:54 -05:00
|
|
|
|
2017-02-18 07:57:14 -05:00
|
|
|
set -eo pipefail
|
2016-12-10 15:53:30 -05:00
|
|
|
|
2018-09-03 02:37:39 -04:00
|
|
|
readonly SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
|
2016-12-09 08:48:54 -05:00
|
|
|
|
2017-10-04 12:13:12 -04:00
|
|
|
find "$SCRIPT_DIR" -mindepth 2 -name '*.svg' -print
|
2016-12-09 08:48:54 -05:00
|
|
|
|
2017-09-20 08:51:58 -04:00
|
|
|
echo -n "Do you want to delete these files? [y/N]: "; read -r REPLY
|
2016-12-09 08:48:54 -05:00
|
|
|
|
|
|
|
case "$REPLY" in
|
|
|
|
[Yy]*)
|
2017-10-04 12:13:12 -04:00
|
|
|
find "$SCRIPT_DIR" -mindepth 2 -name '*.svg' -delete
|
2016-12-09 08:48:54 -05:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Abort."
|
|
|
|
;;
|
|
|
|
esac
|