Check-in [0b6464e93d]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix hardlinks after syncing files/@execs
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0b6464e93d8039fa8df60936be34f81e61bc92ce
User & Date: bdrewery 2012-06-19 05:21:38
Context
2012-06-19
14:29
Use positive -links +1 as NOT 1 is confusing check-in: 55de5ab438 user: bdrewery tags: trunk
05:21
Fix hardlinks after syncing files/@execs check-in: 0b6464e93d user: bdrewery tags: trunk
05:09
Avoid subshell in sh(1) by using {} check-in: 332ad0dc2d user: bdrewery tags: trunk
Changes

Changes to ports/Tools/scripts/sync_from_stage.sh.

79
80
81
82
83
84
85













86
		@*) echo ${line#* } | sh
			;;
		*)
			echo ${line} | pax -p e -drw /
			;;
	esac
done < ${PAXLIST}













exit 0







>
>
>
>
>
>
>
>
>
>
>
>
>

79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
		@*) echo ${line#* } | sh
			;;
		*)
			echo ${line} | pax -p e -drw /
			;;
	esac
done < ${PAXLIST}

# Fix hardlinks by linking each file to the previous if the inodes match
find ${STAGEDIR} -type f ! -links 1 -ls|awk '{print $1 " " $11}'| sort -n | while read line; do
	set -- $line
	tmpinode=$1
	tmpfile=${2##${STAGEDIR}}

	if [ "${tmpinode}" = "${lastinode}" ]; then
		ln -f ${lastfile} ${tmpfile}
	fi
	lastinode=$tmpinode
	lastfile=$tmpfile
done
exit 0