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