I created the bash script below to replace the SVN URL for working copies.
I can confirm this works perfectly on my Linux system however it does NOT work on my Mac OS system. I'll be able to provide the error I get back later but wondered if someone could point me in the right direction. I believe it is to do with the space in the WORKING_DIR variable, I have tried many variations found on Google including escaping the space \ adding " and ' but still no luck.
#!/bin/bash
filepath=$(pwd)
URL=https://192.168.22.225/svn
WORKING_DIR="/Users/user/Documents/Working Copies"
cd "${WORKING_DIR}"
for f in "${WORKING_DIR}"/*
do
if [[ -d $f ]]; then
(
cd "${f##*/}"
#printf "\n$PWD\n${URL}/${f##*/}\n"
svn relocate "${URL}"/"${f##*/}"
)
fi
done
cd "$filepath"
Error:
: No such file or directoryments/Working Copies
'bash: working.sh: line 7: syntax error near unexpected token `do
'bash: working.sh: line 7: `do