ver=$(apt-cache showsrc emacs | sed -rn 's/^Version: 1:([0-9]+).*/\1/p' | sort -n | tail -n1) ||:
for x in {35..25} ""; do
if [[ $ver ]] && (( ver >= x )); then
- echo latest_emacs=emacs
latest_emacs=emacs
break
fi
if apt-cache showsrc emacs$x 2>/dev/null |grep . &>/dev/null; then
- echo latest_emacs=$x
latest_emacs=emacs$x
break
fi
if ! type -p apt-rdepends &>/dev/null; then
sudo apt-get -y install --purge --auto-remove apt-rdepends
fi
- apt-rdepends -p --build-depends --follow=DEPENDS $x/$(debian-codename)|sed -rn 's/^\s*Build-Depends: (\S+).*/\1/p'
+ apt-rdepends -p --build-depends --follow=DEPENDS $x/$(debian-codename) 2>/dev/null |sed -rn 's/^\s*Build-Depends: (\S+).*/\1/p'
done
exit 0
fi
head=$(git rev-parse HEAD)
if ! $recompile && ! $bootstrap && [[ $rev == "$head" ]]; then
echo "already compiled"
- installed_info=$(file $(readlink -f $(type -P emacs)))
- build_info=$(file $dir/src/emacs)
+ installed_info=$(file -b $(readlink -f $(type -P emacs)))
+ build_info=$(file -b $dir/src/emacs)
if [[ $installed_info == "$build_info" ]]; then
echo "already installed exiting"
# this isn't perfect, because install could partially fail or the