]> git.saurik.com Git - apple/file_cmds.git/blob - xcodescripts/hardlink.sh
file_cmds-251.tar.gz
[apple/file_cmds.git] / xcodescripts / hardlink.sh
1 #!/bin/sh
2 # Link input files to output files (in order).
3
4 set -e
5
6 if [ "$SCRIPT_INPUT_FILE_COUNT" -ne "$SCRIPT_OUTPUT_FILE_COUNT" ]; then
7 echo input and output file counts differ
8 exit 1
9 fi
10
11 X=0
12
13 while [ "$X" -lt "$SCRIPT_INPUT_FILE_COUNT" ]; do
14 eval ln -fhv \"\$SCRIPT_INPUT_FILE_$X\" \"\$SCRIPT_OUTPUT_FILE_$X\"
15 X=$((X+1))
16 done