File: update_deb.sh

package info (click to toggle)
tucnak 4.67-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 32,932 kB
  • sloc: ansic: 87,491; sh: 8,857; perl: 516; makefile: 416; xml: 21
file content (28 lines) | stat: -rwxr-xr-x 646 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

echo "*** This is upgrade script for Tucnak"
echo "*** Please follow instructions below"
echo ""

echo "sudo LANG= LC_ALL= dpkg -i '$1' '$2'"
LANG= LC_ALL= sudo dpkg -i "$1" "$2"
if test x"$?" = x"0" ; then
    echo "*** Seems OK. Please restart Tucnak"
    exit 0
else
    echo "*** sudo returns $?, falling to su"
fi


echo "*** Please enter root's password"
echo su -l -c dpkg -i "$1" "$2" root
su -l -c "dpkg -i \"$1\" \"$2\"" root
if test x"$?" = x"0" ; then
    echo "*** Seems OK. Please restart Tucnak"
    exit 0
else
    echo "*** su returns $?, giving up"
    echo "*** Please run as root: dpkg -i '$1' '$2'"
    exit 1
fi