"Fossies" - the Fresh Open Source Software Archive

Member "bed-3.1.1/debian/preinst" (20 May 2021, 752 Bytes) of package /linux/misc/bed-3.1.1.src.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "preinst": 3.1.0_vs_3.1.1.

    1 #!/bin/sh
    2 for fil in /usr/local/share/bed /usr/share/bed
    3 do
    4 if test -f  $fil/uninstallbed.sh
    5     then
    6 wasdir=`pwd`
    7 cd $fil
    8 LINKTO=`readlink $fil`
    9 if test ! -d $LINKTO
   10 then
   11 LINKTO=`dirname $fil`/`readlink $fil`
   12 fi
   13 cd $wasdir
   14 echo previous version in $LINKTO
   15 if test /usr/share/bed = $fil 
   16 then
   17 #   if test $LINKTO = /usr/lib/bed-3.1.1
   18 #   then
   19 #       echo overwrite $LINKTO
   20 #   else
   21 #       echo link to different dir $LINKTO 
   22 #   fi
   23     echo uninstall the old version with:
   24     echo bash $LINKTO/uninstallbed.sh
   25     echo uninstall what is left of the new version with: 
   26     echo dpkg -r bed
   27     echo and reinstall bed
   28 else
   29     echo press:
   30     echo bash $LINKTO/uninstallbed.sh
   31     echo to uninstall previous version
   32     echo and hope that it doesn\'t remove part of the new installation.
   33 fi
   34 fi
   35 done