Última atividade 1770261147

Install scripts for LibreOffice packages from TDF

lo_install-deb.sh Bruto
1#!/bin/bash
2
3# A script to install or update libreoffice releases properly
4
5if [[ "$1" == "-x" ]]; then
6 shift
7 set -x
8fi
9
10me=`basename $0`
11Usage() {
12 echo "Usage: $me [-x][-h|--help] <gzipped-tarball> [<gzipped-tarball>...]"
13 exit 0
14}
15
16if [[ -z "$1" || "$1" == "-h" || "$1" == "--help" ]]; then Usage; fi
17
18# Change these to install on rpm base systems
19tgt=DEBS
20cmd="dpkg -i"
21sfx=deb
22
23for tb in $*; do
24 if [[ ! -f $tb ]]; then
25 if [[ -f "$tb.tgz" ]]; then
26 tb="$tb.tgz"
27 elif [[ -f "$tb.tar.gz" ]]; then
28 tb="$tb.tar.gz"
29 else
30 echo "Can't find $tb or $tb.tgz or $tb.tar.gz - skipping..."
31 read ln
32 continue
33 fi
34 fi
35
36 # find out what the name of the uncompressed subdirectory will be
37 dst=`tar tzf $tb 2> /dev/null | head -1 | awk -F/ '{print $1}'`
38 tar xzf $tb
39 if [[ ! -d $dst/$tgt ]]; then
40 echo "Can't find $me directory $dst/$tgt - skipping..."
41 read ln
42 continue
43 fi
44
45 # install or update, depending on how I was called
46 cd $dst/$tgt
47 case $me in
48 loinst)
49 sudo $cmd *.$sfx
50 if [[ -d desktop-integration ]]; then
51 cd desktop-integration
52 sudo $cmd *.$sfx
53 cd ..
54 fi
55 cd ../..
56 ;;
57 loupdate)
58 cd ..
59 sudo ./update
60 cd ..
61 ;;
62 esac
63
64 # delete the installation directory
65 /bin/rm -rf $dst
66done
67
68echo ""
lo_install-rpm.sh Bruto
1#!/bin/bash
2
3# A script to install or update libreoffice releases properly
4
5if [[ "$1" == "-x" ]]; then
6 shift
7 set -x
8fi
9
10me=`basename $0`
11Usage() {
12 echo "Usage: $me [-x][-h|--help] <gzipped-tarball> [<gzipped-tarball>...]"
13 exit 0
14}
15
16if [[ -z "$1" || "$1" == "-h" || "$1" == "--help" ]]; then Usage; fi
17
18# Change these to install on rpm base systems
19tgt=RPMS
20cmd="rpm -i"
21sfx=rpm
22
23for tb in $*; do
24 if [[ ! -f $tb ]]; then
25 if [[ -f "$tb.tgz" ]]; then
26 tb="$tb.tgz"
27 elif [[ -f "$tb.tar.gz" ]]; then
28 tb="$tb.tar.gz"
29 else
30 echo "Can't find $tb or $tb.tgz or $tb.tar.gz - skipping..."
31 read ln
32 continue
33 fi
34 fi
35
36 # find out what the name of the uncompressed subdirectory will be
37 dst=`tar tzf $tb 2> /dev/null | head -1 | awk -F/ '{print $1}'`
38 tar xzf $tb
39 if [[ ! -d $dst/$tgt ]]; then
40 echo "Can't find $me directory $dst/$tgt - skipping..."
41 read ln
42 continue
43 fi
44
45 # install or update, depending on how I was called
46 cd $dst/$tgt
47 case $me in
48 loinst)
49 sudo $cmd *.$sfx
50 if [[ -d desktop-integration ]]; then
51 cd desktop-integration
52 sudo $cmd *.$sfx
53 cd ..
54 fi
55 cd ../..
56 ;;
57 loupdate)
58 cd ..
59 sudo ./update
60 cd ..
61 ;;
62 esac
63
64 # delete the installation directory
65 /bin/rm -rf $dst
66done
67
68echo ""