dir but I never remembered to propagate to my web site.
Modification times:
2006-12-27 10:25:05 -0500 cp2
2009-10-02 07:55:48 -0400 ftx
2012-10-31 01:03:20 -0400 gitar
2010-12-17 23:32:42 -0500 retex
2010-05-16 03:58:43 -0400 stat2
2012-10-31 01:03:02 -0400 ungitar
-rsync -rltE --chmod=ugo=rwX "$@"
+exec rsync -rltE --chmod=ugo=rwX "$@"
read length
head -c "$length" >"$1"
if [ $type == x ]; then
read length
head -c "$length" >"$1"
if [ $type == x ]; then
# Make a dummy commit to hold all the files.
function list-files-to-add {
find . -wholename './.git' -prune -or '(' -type f -or -type l ')' -printf '%P\n'
}
# Make a dummy commit to hold all the files.
function list-files-to-add {
find . -wholename './.git' -prune -or '(' -type f -or -type l ')' -printf '%P\n'
}
-list-files-to-add | git-update-index --add --stdin >/dev/null
-tree=$(git-write-tree)
+list-files-to-add | git update-index --add --stdin >/dev/null
+tree=$(git write-tree)
- GIT_AUTHOR_NAME='reproducible' GIT_AUTHOR_EMAIL='' GIT_AUTHOR_DATE='946684801 +0000' GIT_COMMITTER_NAME='reproducible' GIT_COMMITTER_EMAIL='' GIT_COMMITTER_DATE='946684801 +0000' git-commit-tree "$@" </dev/null
+ GIT_AUTHOR_NAME='reproducible' GIT_AUTHOR_EMAIL='' GIT_AUTHOR_DATE='946684801 +0000' GIT_COMMITTER_NAME='reproducible' GIT_COMMITTER_EMAIL='' GIT_COMMITTER_DATE='946684801 +0000' git commit-tree "$@" </dev/null
}
clean-commit $tree >.git/refs/heads/master
# Pack things up nicely.
}
clean-commit $tree >.git/refs/heads/master
# Pack things up nicely.
-git-repack -a >/dev/null
+git repack -a >/dev/null
for i in pack idx; do
mv .git/objects/pack/{pack*.$i,pack.$i}
done
for i in pack idx; do
mv .git/objects/pack/{pack*.$i,pack.$i}
done
# Write out git repository as a Matt-style file tree.
function write_file {
# Write out git repository as a Matt-style file tree.
function write_file {
-# Well-behaved repeating TeX builder -- Matt McCutchen
-# usage: retex <cmd> <input-file-minus-.tex>
+# usage: retex [--bibtex] CMD INPUTNAME (without .tex)
+# Add a bibtex option for the streaming notes.
+# Since the bibtex needs to be part of the fixed-pointing, I unfortunately don't
+# see a better way to handle it than as part of retex. - Matt 2008-09-02
+if [ "$1" == --bibtex ]; then
+ bibtex=1
+ shift
+fi
+
+if [ $# != 2 ]; then
+ echo >&2 'usage: retex [--bibtex] CMD INPUTNAME (without .tex)'
+ exit 1
+fi
+
+# Just Work if passed `foo.tex'.
+if [ "$in" != "${in%.tex}" ]; then
+ in="${in%.tex}"
+fi
+
+ if [ $bibtex ] && [ -r "$in.aux" ]; then
+ echo "[$iter] Running bibtex..."
+ bibtex "$in.aux"
+ # Work around \href commands getting line-broken in places that
+ # break things ~ Matt 2010-12-17
+ sed -i -e '/%$/{N; s/%\n//}; /\\href$/{N; s/\n/ /}' "$in.bbl"
+ fi
echo "[$iter] Running $2..."
echo "[$iter] Running $2..."
- yes X | "$cmd" -file-line-error-style "$in"
+ "$cmd" -file-line-error -halt-on-error "$in"
}
function compare {
echo "Comparing files..."
}
function compare {
echo "Comparing files..."
# ignore pdfs because they have a nonreproducible "ID" at the end
# ignore pdfs because they have a nonreproducible "ID" at the end
- # and logs because they aren't read
- if ! [ "$f" != "${f%.keep*}" ] && ! [ "$f" != "${f%.pdf}" ] \
- && ! [ "$f" != "${f%.log}" ]; then
- suf="${f#$in}"
- cmp "$in$suf" "$in.keep$suf" || return $?
+ # and logs because they have a less-reproducible time; neither are read
+ if [ "$f" == "${f#$in.retex-keep.}" ] && [ "$f" == "${f%.pdf}" ] && [ "$f" == "${f%.log}" ]; then
+ suf="${f#$in.}"
+ cmp "$in.retex-keep.$suf" "$in.$suf" || return $?
fi
done
echo "Reached a fixed point."
fi
done
echo "Reached a fixed point."
function keep {
echo "Keeping files..."
function keep {
echo "Keeping files..."
- for f in "$in"*; do
- if ! [ "$f" != "${f%.keep*}" ]; then
- suf="${f#$in}"
- \cp -p "$in$suf" "$in.keep$suf"
+ for f in "$in."*; do
+ if [ "$f" == "${f#$in.retex-keep.}" ]; then
+ suf="${f#$in.}"
+ cp "$in.$suf" "$in.retex-keep.$suf"
fi
done
}
function clean {
echo "Cleaning up kept files..."
fi
done
}
function clean {
echo "Cleaning up kept files..."
- rm -f "$in.keep"*
-}
-
-function fail {
- echo "Compiler exited with code $1."
- # Remove output files here, a la .DELETE_ON_ERROR?
- exit $1
+ rm -f "$in.retex-keep."*
limit=10
while ! compare; do
iter=$(($iter + 1))
limit=10
while ! compare; do
iter=$(($iter + 1))
done
clean
echo "Successful."
done
clean
echo "Successful."
getfacl --absolute-names --tabular -- "$1" | tail -n +2 | head -n -1 | sed -e "s/^/$indent/"
fi
echo "+-- Extended attributes in all namespaces from \`getfattr':"
getfacl --absolute-names --tabular -- "$1" | tail -n +2 | head -n -1 | sed -e "s/^/$indent/"
fi
echo "+-- Extended attributes in all namespaces from \`getfattr':"
- getfattr --absolute-names -h -d -m '' -- "$1" | tail -n +2 | head -n -1 | sed -e "s/^/$indent/"
+ # Add -P, otherwise the getfattr command printed xattrs of subdirectories
+ # when passed ~/cc (a symlink). I think this is a bug. TODO: report it.
+ # ~ 2010-05-16
+ getfattr --absolute-names -h -d -m '' -P -- "$1" | tail -n +2 | head -n -1 | sed -e "s/^/$indent/"
echo "'---------------------------------------"
shift
done
echo "'---------------------------------------"
shift
done
trap "rm -rf .git" EXIT
ftx .git
trap "rm -rf .git" EXIT
ftx .git
-git-read-tree master
-git-checkout-index --all --force
+git read-tree master
+git checkout-index --all --force