This is stupid. I'm trying to recursively copy all files from one main directory to another.
Example:
directory1 contains:
a.txt
b/c.txt
b/d.txt
directory2 contains:
e.txt
b/f.txt
The end result for directory2 should be:
a.txt
e.txt
b/c.txt
b/d.txt
b/f.txt
Well, whatever I do with the cp command, it doesn't work. Here's my current script:
Code:
echo Copying /addons
cp -rf mods/addons/* cstrike/addons/
echo Copying /cfg
cp -rf mods/cfg/* cstrike/cfg/
echo Copying /materials
cp -rf mods/materials/* cstrike/materials/
echo Copying /sound
cp -rf mods/sound/* cstrike/sound/
echo ----------------
echo Done.
echo ----------------
Edit: Okay, it works when it's NOT in a shell (ie, I manually input each command into the command-line). I'd like it to work in a shell script.