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