summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatze Miau <miaukatzemiau@priveasy.de>2012-03-02 09:02:24 (GMT)
committerKatze Miau <miaukatzemiau@priveasy.de>2012-03-02 09:02:24 (GMT)
commit03fa87a10469a4ce339fb5052d9eea421ae8d94c (patch)
tree7314adbaeddbab7a62d4900cc4ec6611a4b316a5
parente2a510ede2fa4db9043586c9ab1de4814cce789c (diff)
toolbin/merge_config: fix missing trash directory
-rwxr-xr-xtoolbin/merge_config5
1 files changed, 3 insertions, 2 deletions
diff --git a/toolbin/merge_config b/toolbin/merge_config
index 88b41e3..65ae313 100755
--- a/toolbin/merge_config
+++ b/toolbin/merge_config
@@ -34,7 +34,7 @@ merge_file () {
exfl "$1" || fail "$1 requested but does not exist"
if [ -f "$2.patch" ]; then
[ -f "$1" ] || fail "$1 is no regular file, not patching"
- patch $(! $quiet || echo --silent) -B trash/ "$1" <"$2.patch"
+ patch $(! $quiet || echo --silent) -B .trash/ "$1" <"$2.patch"
elif [ -f "$2.delete" ]; then
rm "$1"
fi
@@ -94,6 +94,7 @@ else
fi
# iterate over all dirs
+mkdir -p .trash
while [ $# -gt 0 ]; do
${op}_${mode} "$dst~" "$1"
shift
@@ -101,4 +102,4 @@ done
[ -d "$dst" ] && rm -r "$dst"
mv "$dst~" "$dst"
-rm trash/* 2>/dev/null || true \ No newline at end of file
+rm -r .trash/* 2>/dev/null || true \ No newline at end of file
contact: Jan Huwald // Impressum