diff options
| -rwxr-xr-x | release/copyrc.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/release/copyrc.sh b/release/copyrc.sh index 8c21838..f2a56cb 100755 --- a/release/copyrc.sh +++ b/release/copyrc.sh | |||
| @@ -54,20 +54,24 @@ builddirs=("$@") | |||
| 54 | while read line; do | 54 | while read line; do |
| 55 | if [ -z "$line" ] || [[ $line = \#* ]]; then continue; fi | 55 | if [ -z "$line" ] || [[ $line = \#* ]]; then continue; fi |
| 56 | 56 | ||
| 57 | IFS=: read -r srcfile dstfile _ <<< $line | 57 | IFS=: read -r srcfile dstpath _ <<< $line |
| 58 | 58 | ||
| 59 | if [ ! -z "$print" ]; then | 59 | if [ ! -z "$print" ]; then |
| 60 | echo $RC_dir/$dstfile | 60 | echo $RC_dir/$dstpath |
| 61 | continue | 61 | continue |
| 62 | fi | 62 | fi |
| 63 | 63 | ||
| 64 | srcpath=$(find -L ${builddirs[@]} -wholename "*$srcfile" -print -quit) | 64 | srcpath=$(find -L ${builddirs[@]} -wholename "*$srcfile" -print -quit) |
| 65 | 65 | ||
| 66 | if [ "$srcpath" ]; then | 66 | if [ "$srcpath" ]; then |
| 67 | 67 | dstdir=$RC_dir/$(dirname "$dstpath") | |
| 68 | mkdir -p "$RC_dir/$(dirname "$dstfile")" | 68 | dstfile=$(basename "$dstpath") |
| 69 | cp -Lpvr $srcpath $RC_dir/$dstfile | 69 | |
| 70 | 70 | mkdir -p $dstdir | |
| 71 | cp -Lpv $srcpath $dstdir/$dstfile | ||
| 72 | pushd $dstdir | ||
| 73 | md5sum $dstfile > $dstfile.md5 | ||
| 74 | popd | ||
| 71 | else | 75 | else |
| 72 | if [ "$ignore_missing" ]; then | 76 | if [ "$ignore_missing" ]; then |
| 73 | echo "WARNING: File '$srcfile' not found" | 77 | echo "WARNING: File '$srcfile' not found" |
