lvm2/tests/refresh.sh
2023-07-10 13:49:43 +02:00

17 lines
258 B
Bash

#!/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