wok view get-slitaz-extra-themes/stuff/get-slitaz-extra-themes @ rev 19710
xfig: update for libpng >= 1.4.1
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 15 16:08:02 2017 +0100 (2017-02-15) |
parents | |
children |
line source
1 #!/bin/sh -e
3 [ -f '/etc/slitaz/slitaz.conf' ] && . /etc/slitaz/slitaz.conf
4 [ -z "$INSTALLED" ] && INSTALLED='/var/lib/tazpkg/installed'
6 PACKAGE="get-slitaz-extra-themes"
7 PKGNAME="slitaz-extra-themes"
8 PKGSRC="slitaz-themes"
9 VERSION="001"
10 CATEGORY="x-window"
11 SHORT_DESC="Additional themes for Slitaz GNU/Linux."
12 MAINTAINER="hackdorte@sapo.pt"
13 LICENSE="BSD"
14 WEB_SITE="https://github.com/hackdorte/slitaz-themes"
15 TAGS="artwork gtk openbox theme"
17 ROOT="$1"
18 [ -d "$ROOT" ] || ROOT=""
20 if [ $(id -u) -ne 0 ]; then
21 echo -e "\nYou must be root to run `basename $0`."
22 echo -e "Please type 'su' and root password to become super-user.\n"
23 exit 0
24 fi
26 if [ -d $ROOT$INSTALLED/$PKGNAME ]; then
27 [ -n "$ROOT" ] && exit 1
28 tazpkg remove $PKGNAME
29 [ -d $INSTALLED/$PKGNAME ] && exit 1
30 fi
32 # Source Download
33 TARBALL="master.zip"
34 URL="${WEB_SITE}/archive/$TARBALL"
35 TMP_DIR="$(mktemp -d)"
36 CUR_DIR=$(pwd)
37 cd $TMP_DIR
38 busybox wget -O $TARBALL $URL
40 if [ ! -f $TARBALL ]; then
41 echo "Could not download $TARBALL. Exiting."
42 exit 1
43 fi
45 # Unzip Package
46 busybox unzip $TARBALL
48 # Building Base
49 mkdir -p $PKGNAME-$VERSION/fs/usr/share/themes
50 mv $PKGSRC-master/* $PKGNAME-$VERSION/fs/usr/share/themes
51 rm -irf $PKGNAME-$VERSION/fs/usr/share/themes/README.md
52 rm -irf $PKGSRC-master
53 rm -irf $TARBALL
56 # Writing The Receipt
57 cat > $PKGNAME-$VERSION/receipt <<EOT
58 PACKAGE="$PKGNAME"
59 VERSION="$VERSION"
60 CATEGORY="x-window"
61 SHORT_DESC="$SHORT_DESC"
62 WEB_SITE="$WEB_SITE"
63 MAINTAINER="$MAINTAINER"
64 TAGS="$TAGS"
66 EOT
68 # Creating The Tazpkg Package
69 tazpkg pack $PKGNAME-$VERSION
71 # Install Package
72 tazpkg -i $PKGNAME-$VERSION.tazpkg --root=$ROOT
73 case " $@ " in
74 *\ --k*) mv $PKGNAME-$VERSION.tazpkg $CUR_DIR ;;
75 esac
77 # Clean
78 cd $CUR_DIR
79 rm -rf "$TMP_DIR"