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