mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-25 07:45:41 +03:00
only move if the path contains a space
This commit is contained in:
parent
99c6710f1a
commit
693c72b89a
@ -7,10 +7,13 @@ set -euo pipefail
|
|||||||
ROOT_DIR="${1:-}"
|
ROOT_DIR="${1:-}"
|
||||||
|
|
||||||
if [ -z "$ROOT_DIR" ]; then
|
if [ -z "$ROOT_DIR" ]; then
|
||||||
echo "Usage: $0 <directory>"
|
echo "Usage: $0 <directory>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find "$ROOT_DIR" -type f -name '*' -print0 | while IFS= read -r -d '' file; do
|
find "$ROOT_DIR" -type f -name '*' -print0 | while IFS= read -r -d '' file; do
|
||||||
mv -v "$file" "$(echo "$file" | tr ' ' '+')"
|
new_file="$(echo "$file" | tr ' ' '+')"
|
||||||
|
if [[ "$file" != "$new_file" ]]; then
|
||||||
|
mv -v "$file" "$new_file"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user