postinst is in ruby 1:2.5.1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/bin/sh
set -e
update-alternatives --remove-all ruby 2>/dev/null || true
update-alternatives --remove-all gem 2>/dev/null || true
version=2.5
# restore the default version overwriting any change made by
# update-alternatives
for program in erb gem irb rdoc ri ruby; do
target=$(readlink -f /usr/bin/$program)
if [ ! -e /usr/bin/$program -o "$target" = /usr/bin/${program}1.8 -o "$target" = /usr/bin/${program}1.9.1 ]
then
echo "Fixing symlink /usr/bin/$program -> $program$version"
ln -sf $program$version /usr/bin/$program
fi
done
# this is a horrible hack, but will prevent reconfiguration of ruby1.8 or
# ruby1.9.1 from re-adding the alternatives entries.
for package in ruby1.8 ruby1.9.1; do
postinst=/var/lib/dpkg/info/$package.postinst
if [ -e $postinst ]
then
sed -i -e 's/^\s*update-alternatives/: &/' $postinst
fi
done
|