Changeset View
Changeset View
Standalone View
Standalone View
head/sys/conf/newvers.sh
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | while [ $(pwd) != "/" ]; do | ||||
cd .. | cd .. | ||||
done | done | ||||
cd ${savedir} | cd ${savedir} | ||||
return 1 | return 1 | ||||
} | } | ||||
git_tree_modified() | git_tree_modified() | ||||
{ | { | ||||
# git diff-index lists both files that are known to have changes as | $git_cmd "--work-tree=${VCSTOP}" -c core.checkStat=minimal -c core.fileMode=off diff --quiet | ||||
# well as those with metadata that does not match what is recorded in | |||||
# git's internal state. The latter case is indicated by an all-zero | |||||
# destination file hash. | |||||
local fifo | |||||
fifo=$(mktemp -u) | |||||
mkfifo -m 600 $fifo || exit 1 | |||||
$git_cmd --work-tree=${VCSTOP} diff-index HEAD > $fifo & | |||||
while read smode dmode ssha dsha status file; do | |||||
if ! expr $dsha : '^00*$' >/dev/null; then | |||||
rm $fifo | |||||
return 0 | |||||
fi | |||||
if ! $git_cmd --work-tree=${VCSTOP} diff --quiet -- "${file}"; then | |||||
rm $fifo | |||||
return 0 | |||||
fi | |||||
done < $fifo | |||||
# No files with content differences. | |||||
rm $fifo | |||||
return 1 | |||||
} | } | ||||
LC_ALL=C; export LC_ALL | LC_ALL=C; export LC_ALL | ||||
if [ ! -r version ] | if [ ! -r version ] | ||||
then | then | ||||
echo 0 > version | echo 0 > version | ||||
fi | fi | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |