2018-08-10 14:59:24 +02:00
|
|
|
#!/bin/bash
|
2016-07-10 17:34:37 +02:00
|
|
|
#
|
|
|
|
# Common variables
|
|
|
|
#
|
|
|
|
|
2016-07-10 18:19:18 +02:00
|
|
|
# App package root directory should be the parent folder
|
|
|
|
PKGDIR=$(cd ../; pwd)
|
|
|
|
|
2016-07-10 17:34:37 +02:00
|
|
|
#
|
|
|
|
# Common helpers
|
|
|
|
#
|
|
|
|
|
|
|
|
# Execute a command as movim user in the destination directory
|
|
|
|
# usage: exec_cmd COMMAND [ARG ...]
|
|
|
|
exec_cmd() {
|
2018-08-10 16:36:04 +02:00
|
|
|
(cd "$final_path" \
|
2016-07-10 17:34:37 +02:00
|
|
|
&& sudo sudo -u movim "$@")
|
|
|
|
}
|
2016-07-10 18:19:18 +02:00
|
|
|
|
2018-08-10 17:27:41 +02:00
|
|
|
# Undo the SSO patch to Movim source code (applied by default with ynh_setup_source)
|
|
|
|
# usage: undo_sso_patch
|
|
|
|
undo_sso_patch() {
|
|
|
|
(
|
|
|
|
cd $final_path
|
|
|
|
patch -p1 -R < $YNH_CWD/../sources/patches/app-00-sso-logout.patch
|
|
|
|
)
|
2016-07-10 18:19:18 +02:00
|
|
|
}
|