comparison shells/dash/dash-post.sh @ 531:16d26eee4b33

fonts: use new FHS
author David Demelier <markand@malikania.fr>
date Wed, 10 Apr 2019 20:12:00 +0200
parents 89ac6810e2ee
children 70e87450d08f
comparison
equal deleted inserted replaced
530:263706a69f92 531:16d26eee4b33
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 # 16 #
17 17
18 if [ "$1" = "install" ]; then 18 if [ "$1" = "install" ]; then
19 if ! grep -q "/usr/bin/dash" $DESTDIR/etc/shells >/dev/null 2>&1; then 19 if ! grep -q "/bin/dash" $DESTDIR/etc/shells >/dev/null 2>&1; then
20 echo "/usr/bin/dash" >> $DESTDIR/etc/shells 20 echo "/bin/dash" >> $DESTDIR/etc/shells
21 fi 21 fi
22 22
23 # 23 #
24 # dash is the official default shell in Vanilla, but if the user has set 24 # dash is the official default shell in Vanilla, but if the user has set
25 # something else, keep it. 25 # something else, keep it.
26 # 26 #
27 if [ ! -e $DESTDIR/usr/bin/sh ]; then 27 if [ ! -e $DESTDIR/bin/sh ]; then
28 ln -sf dash $DESTDIR/usr/bin/sh 28 ln -sf dash $DESTDIR/bin/sh
29 fi 29 fi
30 elif [ "$1" = "uninstall" ]; then 30 elif [ "$1" = "uninstall" ]; then
31 sed -i -e '/\/usr\/bin\/dash/d' $DESTDIR/etc/shells 31 sed -i -e '/\/\/bin\/dash/d' $DESTDIR/etc/shells
32 32
33 # Remove deadlink to /bin/sh if dash was kept as default shell. 33 # Remove deadlink to /bin/sh if dash was kept as default shell.
34 if [ $(readlink $DESTDIR/usr/bin/sh) = "dash" ]; then 34 if [ $(readlink $DESTDIR/bin/sh) = "dash" ]; then
35 rm -f $DESTDIR/usr/bin/sh 35 rm -f $DESTDIR/bin/sh
36 fi 36 fi
37 fi 37 fi