mirror of
https://codeberg.org/puppe/secrets.git
synced 2025-12-20 00:42:17 +01:00
Do not delete base directory on the target
This commit is contained in:
parent
9e3311eef2
commit
3d8ac1e944
1 changed files with 5 additions and 5 deletions
10
secrets
10
secrets
|
|
@ -90,12 +90,12 @@ rm "$0"
|
|||
echo "!*data" >&2
|
||||
|
||||
read basedir
|
||||
if test -d "$basedir"; then
|
||||
rm -rf "$basedir"
|
||||
if test ! -d "$basedir"; then
|
||||
mkdir "$basedir"
|
||||
chown root:root "$basedir"
|
||||
chmod 755 "$basedir"
|
||||
fi
|
||||
mkdir -p "$basedir"
|
||||
chown root:root "$basedir"
|
||||
chmod 755 "$basedir"
|
||||
rm -rf "$basedir"/*
|
||||
|
||||
while read name; do
|
||||
fullpath="$basedir/$name"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue