Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 700 lines (623 sloc) 18.5 KB
#!/bin/sh
####
# tcext - Quick Extension Creation Script for Tiny Core Linux
#
# i wanted to make it easy to create extensions
# so more people will be able to do it
# also i wanted that people will provide inside the extensions
# a tutorial how to make an extension
#
# this script makes your life simpler
# now you have time to describe your work, reread the extention info, and make more extensions
#
# Written by Shimon Doodkin helpmepro1@gmail.com doodkin.com
#
# Contributors:
# You here - fork and modify https://github.com/shimondoodkin/tcext
#
# lisence: MIT
#
PACK_DIR="$PWD" #execute this file in same directory where you call ./configure and make
cd $PACK_DIR;
EDITOR="`which vi`";
RESULT="`which nano`"; if [ $? -eq 0 ]; then EDITOR="$RESULT -w "; fi # if user installed nano maybe he preferrs nano over vi
write_vars_script()
{
APP="`echo \"$PWD\"|sed -r 's|^.*/(.+)-(.+)\$|\\1|'`"
[ "$APP" == "" ] && APP="lighttpd"
APPVER="`echo \"$PWD\"|sed -r 's|^.*/(.+)-(.+)\$|\\2|'`"
[ "$APPVER" == "" ] && APPVER="1.4.29"
WEBSITE="`cat README*|grep -i project|grep -v /rfc/|grep 'http://'|head -n 1|sed -r 's|^.*(http://[0-9a-zA-Z./-]+).*\$|\\1|'`"
[ "$WEBSITE" == "" ] && WEBSITE="`cat README*|grep -v /rfc/ |grep 'http://'|head -n 1|sed -r 's|^.*(http://[0-9a-zA-Z./-]+).*\$|\\1|'`"
[ "$WEBSITE" == "" ] && WEBSITE="http://lighttpd.com"
### TBD:auto guess more variables, maybe suggest build string from online database
## if you modify this and write $ or `(backquote) backslash them
cat <<ENDOFINFO >$PACK_DIR/tcext.info
##note: this is a shell script
######### edit package info: #############
PACK_APP="$APP"
APP_VER="$APPVER"
APP_WEBSITE="$WEBSITE"
# can copy-paste(SHIFT+INS) a short overview from apps's website:
APP_DESCRIPTION=\`cat <<EOF
Light httpd Web server
EOF
\`
APP_AUTHOR="lighttpd"
APP_COPY="BSD"
PACK_AUTHOR="you"
#write below installation comments
PACK_COMMENTS=\`cat <<EOF
EOF
\`
#deps are calculated automatically, you can add more here
PACK_ADD_DEPS=\`cat <<EOF
EOF
\`;
#######################################
#write here the build reason: , update date, log date is MM/DD/YY
PACK_LOG=\`cat <<EOF
`date +%d/%m/%y` Initial Build
EOF
\`;
#each time you build, copy a line from above to here and write above a new date and value
PACK_LOGS=\`cat <<EOF
EOF
\`;
PACK_WHAT_I_DID_IS=\`cat <<EOF
EOF
\`;
ENDOFINFO
#one more thing, create directory for addon files.
if [ -f $PACK_DIR/tcfiles ]; then
mkdir $PACK_DIR/tcfiles # put in this folder configuration files and other files to copy over the /
fi
}
tcext_flags()
{
export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export LDFLAGS="-Wl,-O1"
}
tcext_configure()
{
# TBD: probably better to keep the string saved somewhere
tcext_flags
CONFIGURE_ARGS="`echo \"$@\"|sed \"s/^$1//\"`" #remove first argument (configure or build)
echo "`date --rfc-3339=seconds` $CONFIGURE_ARGS" >> $PACK_DIR/tcext.configure-history
./configure $CONFIGURE_ARGS --prefix=/usr/local
RESULT=$?;
if [ $RESULT -ne 0 ]; then
echo "there was a './configure' error";
echo "there was a './configure' error">> $PACK_DIR/tcext.configure-history;
exit $RESULT;
else
echo "$CONFIGURE_ARGS" > $PACK_DIR/tcext.configure
echo "configure ok">> $PACK_DIR/tcext.configure-history;
fi
}
tcext_make()
{
# TBD: probably better to keep the string saved somewhere
tcext_flags
make
RESULT=$?;
if [ $RESULT -ne 0 ]; then
echo "there was a 'make' error">> $PACK_DIR/tcext.configure-history;
exit $RESULT;
else
echo "make ok">> $PACK_DIR/tcext.configure-history;
fi
}
ident_multiline_text()
{
#ident text beutifully, with little work
TEXT=` echo "$1" | fold -sw 55 ` # wrap text at 55
TEXT1=`echo "$TEXT" | head -n 1` # no need to ident the first line
TEXT2=`echo "$TEXT" | sed 1d | sed 's/^.*$/ \0/' ` #ident the other lines
echo "$TEXT1\
$TEXT2" # concat the result
}
copy_additional_files()
{
if [ "`find $PACK_DIR/tcfiles/etc/init.d/ -type f -perm -og+rx`" == "" ] ; then
echo "please notice: there are non executable files in ./tcfiles/etc/init.d/..."
fi
# copy additional files
cp $PACK_DIR/tcfiles/* /tmp/pkg/ -r
}
tcext_installtemp()
{
#include the package info
#. $PACK_DIR/tcext.info
[ -e /tmp/mark1 ] && rm /tmp/mark1
[ -e /tmp/mark2 ] && rm /tmp/mark2
[ -e /tmp/list ] && rm /tmp/list
[ -e /tmp/pkg ] && rm -rf /tmp/pkg
mkdir /tmp/pkg
touch /tmp/mark1 #make a time mark in case DESTDIR fails
make install DESTDIR=/tmp/pkg #DESTDIR may not work ... then use:
touch /tmp/mark2 # make end time time mark
#tar is used to copy files by filenames without directories (it creates directories automatically)
if [ "`ls /tmp/pkg/`" == "" ] ; then
find /usr/local -newer /tmp/mark1 -not -newer /tmp/mark2 -not -type d > /tmp/list
tar -T /tmp/list -czvf /tmp/$PACK_APP.tar.gz
cd /tmp/pkg
tar -xf /tmp/$PACK_APP.tar.gz # unpack (install) the extension in tmp
fi
copy_additional_files
}
tcext_deps()
{
echo "looking for deps">&2
#cd /tmp/pkg
EXEFILES="`find . | xargs file | grep \"executable\" | grep ELF | cut -f 1 -d : 2> /dev/null; find . | xargs file | grep "shared object" | grep ELF | grep \"not stripped\" | cut -f 1 -d : 2> /dev/null;`"
LIBS="`(
for forfile in $EXEFILES; do
ldd $forfile|sed -r 's|^\s*(.+)\s+\(0x.+\)$|\1|' \
|sed -r 's|^\s*(.+)\s+=>\s+(\S+)$|\2|' \
|sed -r "s|^\s*(.+)\\s+=>\\s+not found\$|not found: $forfile => \\1|" \
|sed -r 's|^\s*(.+)\s+=>\s+$|\1|'
done
) | sort | uniq |grep -v 'linux-gate.so.1' `"
echo "$LIBS" |grep "not found" >&2
LIBS="`echo \"$LIBS\" |grep -v \"not found\" |xargs realpath`"
NO_PACKAGE="`echo \"$LIBS\"|awk '!/tcloop/ {print \"no package: \" $0}'`"
FOUND_DEPS="`echo \"$LIBS\"|xargs df|sed '/Filesystem/d'|awk '/tcloop/ {print $6}'|sed 's|/tmp/tcloop/||'| sort | uniq | sed 's|^.*$|\0.tcz|'`"
#[ "$NO_PACKAGE" != "" ] && echo -e "No packages found for files:\r\n$NO_PACKAGE">&2
[ "$NO_PACKAGE" != "" ] && echo "$NO_PACKAGE">&2
echo "$FOUND_DEPS"
}
tcext_packtemp()
{
#. $PACK_DIR/tcext.info
cd /tmp/pkg/
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null
[ ! -e /tmp/pkg/usr/local/tce.installed/$PACK_APP ] && \
sudo chmod +x /tmp/pkg/usr/local/tce.installed/$PACK_APP && \
sudo chown root:staff /tmp/pkg/usr/local/tce.installed/$PACK_APP #there is a recomendation to make this script owned by root, i dont see a need in this, but folowed it anyways
PACK_DEPS="`tcext_deps`";
[ ! -e $PACK_DIR/tcout ] && mkdir $PACK_DIR/tcout # here you receive the result
# make file list for the extension
find -type f | sed 's/^..//' | sed '/^\.$/d' > $PACK_DIR/tcout/$PACK_APP.tcz.list # remove first 2 chars and the dot file
#make loadable file system image file
cd /tmp
mksquashfs pkg/ $PACK_APP.tcz
[ ! -e /tmp/pkg/usr/local/tce.installed/$PACK_APP ] && \
sudo chown tc:staff /tmp/pkg/usr/local/tce.installed/$PACK_APP #undo owned by root to prevent silly deletition problems
#copy the result to tc out folder
mv $PACK_APP.tcz $PACK_DIR/tcout/
echo "install ok">> $PACK_DIR/tcext.configure-history;
# add md5sum
cd $PACK_DIR/tcout/
md5sum $PACK_APP.tcz > $PACK_APP.tcz.md5.txt
# write dependency file
(
echo "$PACK_ADD_DEPS"
echo "$PACK_DEPS"
) | sort | uniq | sed -r '/^\s*$/d' >$PACK_DIR/tcout/$PACK_APP.tcz.dep
# TBD: dont know hot to do it yet
# write dependency tree file if required
# dependencies tree idented with spaces
#cat <<EOT >$PACK_DIR/tcout/$PACK_APP.tcz.tree
#EOT
tcext_tree() ##half done TBD
{
tcedone="/tmp/tcedone.$$"
touch ${tcedone}
tcedir="$(cat /opt/.tce_dir)"
depends()
{
grep -v "^ *$" 2>/dev/null ${tcedir}/optional/$1.tcz.dep |
while read tce; do
tce=${tce%.tcz}
echo "\"${1}\" -> \"${tce}\""
if ! grep -q "^${tce}.tcz$" ${tcedone}; then
echo ${tce}.tcz >> ${tcedone}
depends "${tce}"
fi
done
}
cat ${tcedone}
[ -e ${tcedone} ] && rm -f ${tcedone}
}
APP_SIZE=`echo \`du -chs $PACK_APP.tcz|grep total |sed s/total//\`` # echo is like trim
APP_DESCRIPTION="`ident_multiline_text \"$APP_DESCRIPTION\"`"
PACK_COMMENTS="`ident_multiline_text \"$PACK_COMMENTS\"`"
PACK_LOG="`ident_multiline_text \"$PACK_LOG\"`"
PACK_LOGS="`ident_multiline_text \"$PACK_LOGS\"`"
PACK_WHAT_I_DID_IS="`ident_multiline_text \"$PACK_WHAT_I_DID_IS\"`"
cat <<EOT >$PACK_DIR/tcout/$PACK_APP.tcz.info
Title: $PACK_APP
Description: $APP_DESCRIPTION
Version: $APP_VER
Author: $APP_AUTHOR
Original-site: $APP_WEBSITE
Copying-policy: $APP_COPY
Size: $APP_SIZE
Extension_by: $PACK_APP
Comments: $PACK_COMMENTS
Change-log: $PACK_LOGS
Current: $PACK_LOG
Configure: $PACK_CONFIG
What-I-did-Is: $PACK_WHAT_I_DID_IS
-
Made with tcext https://gist.github.com/1405813
EOT
}
tcext_submit()
{
echo "half done, TBD, to use some simple account from gmail"
##more smtp reference http://www.debian-administration.org/article/Testing_SMTP_servers_with_SWAKS
exit;
{
sleep 5;
echo 'ehlo';
sleep 3;
echo 'MAIL FROM:<freeposter3@gmail.com>';
sleep 3;
echo 'RCPT TO: <kyle@test_dest.com>';
sleep 3;
echo 'DATA';
sleep 3;
echo -e 'To:kyle@testdest.com\nMIME-Version: 1.0 (mime-construct 1.9)\nContent-Type: application/zip\nContent-Transfer-Encoding: base64\n\n';
dd if=/dev/urandom bs=4 count=10 2>/dev/null | openssl base64;
echo '.';
echo '.';
sleep 3;
echo 'quit';
} | nc smtp.gmail.com 25
}
tcext_load()
{
TCE_DIR=`cat /opt/.tce_dir`
cp -f $PACK_DIR/tcout/$PACK_APP.tcz $TCE_DIR/optional/
cp -f $PACK_DIR/tcout/$PACK_APP.tcz.md5.txt $TCE_DIR/optional/
cp -f $PACK_DIR/tcout/$PACK_APP.tcz.dep $TCE_DIR/optional/
tce-load -i $PACK_APP.tcz
}
tcext_unload()
{
# Copyright 2011 Marco Caminati. Released under GPLv3.
# Pass any content to $keepdir to prevent deleting the directories emptied in the process
set -e
set -u
#set -x
# To speed up script, I assumed that:
# 1) tce-load -i links each /tmp/tcloop/filepath to /filepath
# 2) there is no path in an extension containing " character
# 3) No abmnormously long paths in extension (xargs -n 100 places a very high, but finite, limit on it). Oddly, the increase in execution time got setting -n 1 is unexpectedly low, about +10% (on a very big tcz).
b=busybox
name=`$b echo "$1" | $b sed -e 's_/*$__' | $b egrep -o "[^/]*$"`
mntdir=/tmp/tcloop/$name
keepdir="${keepdir:-}"
mntlist="/proc/mounts"
echo $mntdir | grep -q ! && exit 6
loopdev="$(egrep "${mntdir}" "${mntlist}" | sed "s_\(.*\) squashfs .*\$_\1_" | egrep "${mntdir} *$" | cut -f 1 -d ' ')"
squashfile="$($b losetup | egrep "^ *${loopdev} *:" | cut -f 3- -d " ")"
[ -s "${squashfile}" ] || exit 2
$b umount "${mntdir}" || exit 3
sudo $b mount "${squashfile}" "${mntdir}" -t squashfs -o loop,ro,bs=4096 || exit 4
# Error 4 is big trouble!
cd "${mntdir}"
find ! -type d | cut -f 2- -d . | sed 's_.*_"&"_'| xargs -r -n 100 $b ls -l | grep -o -- "-> ${mntdir}/.*$"| sed "s_^-> ${mntdir}\(.*$\)_\"\1\"_" | sudo $b xargs -r -n 100 rm
[ "$keepdir" ] || $b find -type d | $b cut -f 2- -d . | $b sed = | $b sed 'N;s/\n/ /' | $b sort -nr | $b cut -f 2- -d " " | $b sed 's/.*/"&"/'| sudo $b xargs -r -n 100 rmdir -p || true
# |grep -v "Directory not empty" |grep -v "No such file or directory"
#sort -nr is due to the way rmdir -p works
cd ..
$b umount -d "${mntdir}" || exit 5
cd /usr/local/tce.installed || exit 2
$b find -maxdepth 1 -size +0c | $b egrep -q "${name}" && exit 7
# Debugline for inner consistency check
$b rm "${name}" || true # |grep -v "No such file or directory"
$b rmdir "${mntdir}" # |grep -v "Directory not empty"
}
create_init_script()
{
if [ ! -f $PACK_DIR/tcfiles/usr/local/tce.installed/$PACK_APP ]; then
echo "extention init script tcfiles/usr/local/tce.installed/$PACK_APP not found, creating it"
[ ! -f $PACK_DIR/tcfiles/usr/local/tce.installed ] && mkdir -p $PACK_DIR/tcfiles/usr/local/tce.installed
## backslash ` and $ and \
cat <<EOF >$PACK_DIR/tcfiles/usr/local/tce.installed/$PACK_APP
#!/bin/sh
#
##copy a file not as symlink:
#[ ! -e /etc/lighttpd ] && cp -p /etc/lighttpd.sample /etc/lighttpd
#
##copy directory not as sym links:
#[ ! -e /etc/lighttpd ] && (mkdir /etc/lighttpd; cd /etc/lighttpd.sample; tar -hpcf - .|tar -xpf - -C /etc/lighttpd)
EOF
$EDITOR $PACK_DIR/tcfiles/usr/local/tce.installed/$PACK_APP
chmod +x $PACK_DIR/tcfiles/usr/local/tce.installed/$PACK_APP
else
echo "extention init script tcfiles/usr/local/tce.installed/$PACK_APP found, editing..."
$EDITOR $PACK_DIR/tcfiles/usr/local/tce.installed/$PACK_APP
fi
}
require_info()
{
EDIT=$1
if [ ! -f $PACK_DIR/tcext.info ]; then
echo 'tcext.info not found, creating it'
write_vars_script
$EDITOR tcext.info
echo "you can put additional files to copy over / to ./tcfiles "
elif [ "$EDIT" == "1" ]; then
echo "tcext.info found, editing..."
#echo "note: to recreate the file view the file, then delete it, then run 'tcext init' again"
$EDITOR tcext.info
fi
. $PACK_DIR/tcext.info
}
TCE_DIR=`cat /opt/.tce_dir`
loadtcz()
{
[ -e $TCE_DIR/optional/$1.tcz ] && tce-load -i $1.tcz
[ ! -e $TCE_DIR/optional/$1.tcz ] && tce-load -w -i $1.tcz
}
case "${1}" in
init)
require_info 1
;;
info)
require_info 1
;;
script)
require_info
create_init_script
;;
flags)
. $PACK_DIR/tcext.info
tcext_flags
;;
configure)
require_info
$0 flags
tcext_configure "$@"
;;
make)
. $PACK_DIR/tcext.info
tcext_make
;;
deps)
tcext_deps
;;
#build)
# require_info
# tcext_configure "$@"
# tcext_make
# tcext_packtemp
# tcext_installtemp
#;;
installtemp)
require_info
$0 flags
echo 'building tcz extension'
tcext_installtemp
;;
packtemp)
require_info
tcext_packtemp
;;
install)
require_info
$0 flags
echo 'building tcz extension'
tcext_installtemp
[ ! -e /tmp/${PACK_APP}.tar.gz ] && rm -f /tmp/${PACK_APP}.tar.gz
[ ! -e /tmp/list ] && rm -f /tmp/list
cd /tmp/pkg
find -not -type d \
-not -ipath '*/include/*' \
-not -iname '*.a' \
-not -iname '*.la' \
-not -iname '*.h' \
-not -iname '*.c' \
-not -ipath '*/aclocal/*' \
-not -ipath '*/pkgconfig/*' \
-not -ipath '*/man/*' \
-not -ipath '*/doc/*' \
-not -ipath '*/docs/*' \
-not -iname 'README*' \
-not -iname 'INSTALL*' \
-not -iname '*.html' > /tmp/list
tar -T /tmp/list -cpzvf /tmp/${PACK_APP}.tar.gz
cd /tmp
rm -rf /tmp/pkg
mkdir /tmp/pkg
cd /tmp/pkg
tar -pxf /tmp/${PACK_APP}.tar.gz # unpack (install) the extension in tmp
rm -f /tmp/list
rm -f /tmp/${PACK_APP}.tar.gz
copy_additional_files
tcext_packtemp
;;
installdev)
require_info
$0 flags
echo 'building tcz extension'
PACK_ADD_DEPS="$PACK_ADD_DEPS\n${PACK_APP}.tcz"
PACK_APP="${PACK_APP}-dev"
tcext_installtemp
[ ! -e /tmp/${PACK_APP}.tar.gz ] && rm -f /tmp/${PACK_APP}.tar.gz
[ ! -e /tmp/list ] && rm -f /tmp/list
cd /tmp/pkg
find -not -type d \( \
-ipath '*/include/*' \
-or -iname '*.a' \
-or -iname '*.la' \
-or -iname '*.h' \
-or -iname '*.c' \
-or -ipath '*/aclocal/*' \
-or -ipath '*/pkgconfig/*' \) > /tmp/list
tar -T /tmp/list -cpzvf /tmp/${PACK_APP}.tar.gz
cd /tmp
rm -rf /tmp/pkg
mkdir /tmp/pkg
cd /tmp/pkg
tar -pxf /tmp/${PACK_APP}.tar.gz # unpack (install) the extension in tmp
rm -f /tmp/list
rm -f /tmp/${PACK_APP}.tar.gz
# no copy additional files in dev
tcext_packtemp
;;
installdocs)
require_info
$0 flags
PACK_ADD_DEPS="$PACK_ADD_DEPS\n${PACK_APP}.tcz"
PACK_APP="${PACK_APP}-docs"
echo 'building tcz extension'
tcext_installtemp
[ ! -e /tmp/${PACK_APP}.tar.gz ] && rm -f /tmp/${PACK_APP}.tar.gz
[ ! -e /tmp/list ] && rm -f /tmp/list
cd /tmp/pkg
find -not -type d \( \
-ipath '*/man/*' \
-or -ipath '*/doc/*' \
-or -ipath '*/docs/*' \
-or -iname 'README*' \
-or -iname 'INSTALL*' \
-or -iname '*.html' \) > /tmp/list
tar -T /tmp/list -cpzvf /tmp/${PACK_APP}.tar.gz
rm -rf /tmp/pkg
mkdir /tmp/pkg
cd /tmp/pkg
tar -pxf /tmp/${PACK_APP}.tar.gz # unpack (install) the extension in tmp
rm -f /tmp/list
rm -f /tmp/${PACK_APP}.tar.gz
# no copy additional files in docs
tcext_packtemp
;;
installfull)
require_info
$0 flags
echo 'building tcz extension'
tcext_installtemp
tcext_packtemp
;;
submit)
require_info
tcext_submit
;;
tools)
loadtcz compiletc
loadtcz python
loadtcz openssl-1.0.0-dev
loadtcz squashfs-tools-4.x
loadtcz strace
loadtcz pcre-dev
loadtcz libtool
loadtcz libtool-dev
loadtcz pkg-config
loadtcz autoconf
loadtcz automake
;;
"--help")
$0 help
;;
help)
cat <<EOF
usage:
tcext tools - tce-load compiletc and squashfs-tools and other development tools
tcext init - crates tcext.info and shows an editor with the file
tcext script - creates an init script with app's name to rename configuration
tcext configure OPTIONS - does flags, and ./configure \$OPTIONS --prefix=/usr/local
tcext make - does flags and make
tcext install - does installtemp, strips docs and dev, and does packtemp
tcext installdocs - does installtemp, takes just docs, and does packtemp
tcext installdev - does installtemp, takes just dev files, and does packtemp
additional:
tcext installfull - does installtemp, and does packtemp
tcext flags - a shorthand to exports arch 486 flags... , when you do the ./configure and make manualy
tcext deps - calculate dependencies in current folder
tcext installtemp - does make install into a /tmp/pkg folder and copis tcfiles/* to /tmp/pkg
tcext packtemp - it packages /tmp/pkg and puts the file.tcz in ./tcout folder
tcext reload - copies tcfiles/* to /tmp/pkg, does packtemp, does unload, does load
tcext load, tcext unload
tcext loaddocs, tcext unloaddocs, tcext reloaddocs
tcext loaddev, tcext unloaddev, tcext reloaddev
utility:
tcext load package-name
tcext unload package-name
tcext help - show this message
EOF
;;
load)
if [ "$2" != "" ]; then
PACK_APP=$2
loadtcz "$PACK_APP"
else
require_info
tcext_load
fi
;;
unload_helper)
tcext_unload "$2"
;;
unload)
if [ "$2" != "" ]; then
PACK_APP=$2
sudo $0 unload_helper "$PACK_APP"
else
require_info
sudo $0 unload_helper "$PACK_APP"
fi
;;
reload)
if [ "$2" != "" ]; then
PACK_APP=$2
sudo $0 unload_helper "$PACK_APP"
loadtcz "$PACK_APP"
else
require_info
copy_additional_files
tcext_packtemp
sudo $0 unload_helper "$PACK_APP"
tcext_load
fi
;;
loaddocs)
require_info
PACK_APP="${PACK_APP}-docs"
tcext_load
;;
unloaddocs)
require_info
PACK_APP="${PACK_APP}-docs"
sudo $0 unload_helper "$PACK_APP"
;;
reloaddocs)
require_info
PACK_APP="${PACK_APP}-docs"
$0 installdocs
sudo $0 unload_helper "$PACK_APP"
tcext_load
;;
loaddev)
require_info
PACK_APP="${PACK_APP}-dev"
tcext_load
;;
unloaddev)
require_info
PACK_APP="${PACK_APP}-dev"
sudo $0 unload_helper "$PACK_APP"
;;
reloaddev)
require_info
PACK_APP="${PACK_APP}-dev"
$0 installdev
sudo $0 unload_helper "$PACK_APP"
tcext_load
;;
all)
echo "tcext doing all tasks"
require_info
$0 build
$0 install
;;
*)# no arguments do all tasks
$0 help
;;
esac