Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # http://www.pearltrees.com/s243a/preserve-path-strip-from-ruby/id15335231
- # http://murga-linux.com/puppy/viewtopic.php?t=101911
- #!/bin/bash
- #cp_preserve_path
- prefix=$1
- file_path=$2
- file_dir=${file_path%/*}
- target="$prefix$file_dir"
- if [[ ! -d $target ]] ;then
- mkdir -p $target
- fi
- cp $file_path $target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement