I have some directories in a location, that location's absolute path is stored in
PROJECT_HOME. Now, I am trying to do the following in a script:
TARGET_LIST="bin lib scripts deployment" tar -czf project.tar.gz -C "$PROJECT_HOME" "$TARGET_LIST"
but tar gives me the following:
tar: bin lib scripts deployment: Cannot stat: No such file or directory tar: Error exit delayed from previous errors
The tar command works if I substitute the values of
tar -czf project.tar.gz -C "$PROJECT_HOME" lib bin scripts deployment), but doesn't when I use the variable.
What am I doing wrong?