lvm2/tests/refresh.sh

17 lines
258 B
Bash
Raw Normal View History

2021-05-20 08:53:47 +00:00
#!/bin/bash
refresh_dirs() {
local dir=
while [[ -n "$*" ]]; do
if [[ -d "$1" ]]; then
rm -rf "$1"
fi
mkdir -p "$(dirname "$1")"
mkdir "$1"
shift
done
}
refresh_dirs ~/rpmbuild/SRPMS ~/rpmbuild/RPMS
refresh_dirs /tmp/source