wok view get-sublime-text-3/stuff/get-sublime-text-3 @ rev 23985
linld: up to 60k for header.com
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 28 09:45:01 2020 +0000 (2020-11-28) |
parents | 54602f26242f |
children |
line source
1 #!/bin/sh
2 # get Sublime Text 3
3 WGET_URL="$(wget -O - http://www.sublimetext.com/3 | tr '"' '\n' | fgrep x32.tar)"
4 VERSION=${WGET_URL%_x32*}; VERSION=${VERSION##*_}
6 # download tarball and extract
7 rm -rf $1/opt/sublime_text 2>/dev/null
8 mkdir -p $1/opt; cd $1/opt; busybox wget -O - $WGET_URL | busybox tar -xf -
9 cd $1/opt; mv sublime_text_3 sublime_text
11 # move desktop file
12 mv $1/opt/sublime_text/sublime_text.desktop $1/usr/share/applications
14 # link icons
15 for size in $(cd $1/opt/sublime_text/Icon; ls); do
16 mkdir -p $1/usr/share/icons/hicolor/$size/apps
17 ln -fs $1/opt/sublime_text/Icon/$size/sublime-text.png \
18 $1/usr/share/icons/hicolor/$size/apps/sublime-text.png
19 done
21 # make receipt
22 PKGDIR="$1/var/lib/tazpkg/installed/sublime-text-3"
23 mkdir -p "$PKGDIR"
24 cat > "$PKGDIR/receipt" << EOR
25 # SliTaz package receipt.
27 PACKED_SIZE="6.1M"
28 UNPACKED_SIZE="16.1M"
29 PACKAGE="sublime-text-3"
30 VERSION="$VERSION"
31 CATEGORY="development"
32 SHORT_DESC="Sophisticated text editor for code, markup and prose"
33 MAINTAINER="al.bobylev@gmail.com"
34 LICENSE="non-free"
35 WEB_SITE="http://www.sublimetext.com/3"
37 DEPENDS=""
38 EOR
40 # make files.list
41 cd $1/
42 find opt/sublime_text -type f > "$PKGDIR/files.list"
43 echo 'usr/share/applications/sublime_text.desktop' >> "$PKGDIR/files.list"
44 find usr/share/icons/hicolor -name sublime-text.png >> "$PKGDIR/files.list"
45 sed -i 's|.*|/\0|' $PKGDIR/files.list
47 # make md5sum
48 while read file; do
49 md5sum "$1$file" >> $PKGDIR/md5sum
50 done < $PKGDIR/files.list