Последняя активность 1770261147

Install scripts for LibreOffice packages from TDF

jce ревизий этого фрагмента 1770261147. К ревизии

1 file changed, 68 insertions

lo_install-rpm.sh(файл создан)

@@ -0,0 +1,68 @@
1 + #!/bin/bash
2 +
3 + # A script to install or update libreoffice releases properly
4 +
5 + if [[ "$1" == "-x" ]]; then
6 + shift
7 + set -x
8 + fi
9 +
10 + me=`basename $0`
11 + Usage() {
12 + echo "Usage: $me [-x][-h|--help] <gzipped-tarball> [<gzipped-tarball>...]"
13 + exit 0
14 + }
15 +
16 + if [[ -z "$1" || "$1" == "-h" || "$1" == "--help" ]]; then Usage; fi
17 +
18 + # Change these to install on rpm base systems
19 + tgt=RPMS
20 + cmd="rpm -i"
21 + sfx=rpm
22 +
23 + for 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
66 + done
67 +
68 + echo ""

jce ревизий этого фрагмента 1770261088. К ревизии

1 file changed, 68 insertions

lo_install-deb.sh(файл создан)

@@ -0,0 +1,68 @@
1 + #!/bin/bash
2 +
3 + # A script to install or update libreoffice releases properly
4 +
5 + if [[ "$1" == "-x" ]]; then
6 + shift
7 + set -x
8 + fi
9 +
10 + me=`basename $0`
11 + Usage() {
12 + echo "Usage: $me [-x][-h|--help] <gzipped-tarball> [<gzipped-tarball>...]"
13 + exit 0
14 + }
15 +
16 + if [[ -z "$1" || "$1" == "-h" || "$1" == "--help" ]]; then Usage; fi
17 +
18 + # Change these to install on rpm base systems
19 + tgt=DEBS
20 + cmd="dpkg -i"
21 + sfx=deb
22 +
23 + for 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
66 + done
67 +
68 + echo ""
Новее Позже