mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 09:47:19 +08:00
28 lines
453 B
Plaintext
28 lines
453 B
Plaintext
_destdir=opt/apps/larch
|
|
|
|
post_install() {
|
|
post_upgrade
|
|
}
|
|
|
|
post_upgrade() {
|
|
echo "byte-compile python modules ..."
|
|
python2 -m compileall -l ${_destdir}/cli
|
|
python2 -m compileall -l ${_destdir}/gui
|
|
python2 -m compileall -l ${_destdir}/gui/front
|
|
}
|
|
|
|
pre_remove() {
|
|
pre_upgrade
|
|
}
|
|
|
|
pre_upgrade() {
|
|
echo "Remove .pyc files ..."
|
|
rm -f ${_destdir}/cli/*.pyc
|
|
rm -f ${_destdir}/gui/*.pyc
|
|
rm -f ${_destdir}/gui/front/*.pyc
|
|
}
|
|
|
|
op=$1
|
|
shift
|
|
$op $*
|