-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-tcz.sh
More file actions
executable file
·57 lines (47 loc) · 1.42 KB
/
build-tcz.sh
File metadata and controls
executable file
·57 lines (47 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
# Build .tcz extension package for version 3.0 of Tinycore
echo "PROG is ${PROG}"
echo "PROG is `echo ${PROG}`"
PROG=$1
PROG_CAPS=$2
BASEDIR=$3
DESC=$4
mkdir /tmp/${PROG}
cd /tmp/${PROG}
# Executable
mkdir -p usr/local/bin
cp ${BASEDIR}/${PROG} usr/local/bin/
chmod 755 usr/local/bin/${PROG}
# Icon
mkdir -p usr/local/share/pixmaps
cp ${BASEDIR}/${PROG}.png usr/local/share/pixmaps
# .desktop file for icons on desctop, menu items
DOTDESKTOP=usr/local/share/applications/${PROG}.desktop
mkdir usr/local/share/applications
echo "[Desktop Entry]" > ${DOTDESKTOP}
echo "Encoding=UTF-8" >> ${DOTDESKTOP}
echo "Name=${PROG}" >> ${DOTDESKTOP}
echo "Comment=${DESC}" >> ${DOTDESKTOP}
echo "GenericName=${PROG_CAPS}" >> ${DOTDESKTOP}
echo "Exec=${PROG}" >> ${DOTDESKTOP}
echo "Icon=${PROG}" >> ${DOTDESKTOP}
echo "Terminal=false" >> ${DOTDESKTOP}
echo "StartupNotify=true" >> ${DOTDESKTOP}
echo "Type=Application" >> ${DOTDESKTOP}
echo "Categories=Utility;" >> ${DOTDESKTOP}
echo "X-FullPathIcon=/usr/local/share/pixmaps/${PROG}.png" >> ${DOTDESKTOP}
echo "******************************"
cat ${DOTDESKTOP}
echo "******************************"
cd usr/local
cd /tmp/${PROG}
mksquashfs . ../${PROG}.tcz
#cd $TMPDIR
find usr -not -type d > ../${PROG}.tcz.list
# Create md5 file
cd /tmp
md5sum ${PROG}.tcz > ${PROG}.tcz.md5.txt
cp /tmp/${PROG}.tcz* ${BASEDIR}
rm -rf /tmp/${PROG}
rm -rf /tmp/${PROG}.tcz*
echo "Build of .tcz for TC 3.0 is complete."