summaryrefslogtreecommitdiffstats
path: root/base/pkg-get-awk/post-install
blob: 249cbf8fcf98640e9e3225445826b4287eb4234e (plain)
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
30
#!/bin/sh

pkf=/usr/bin/pkg-get
syn=/usr/bin/syn
if [ -L $pkf ]; then
   rm $pkf
else
   file $pkf | grep perl >/dev/null
   if [ $? -eq 0 ]; then
      mv $pkf $pkf.pl
   fi
fi
if [ -L $syn ]; then
   rm $syn
else
   file $syn | grep bash >/dev/null
   if [ $? -eq 0 ]; then
      mv $syn $syn.old
   fi
fi
if [ -f $pkf ]; then
   echo "pkg-get-awk_post_install: ERREUR, le fichier $pkf existe déjà !!!"
   exit 1
fi
ln -s /usr/bin/pkg-get.awk $pkf
ln -s /usr/bin/syn.awk $syn
if [ ! -f /etc/pkg-get.conf ]; then
   cp -p /etc/pkg-get-awk.conf /etc/pkg-get.conf
fi