Merge pull request #83 from YunoHost/app_helper

Add helper bash functions for apps developers
This commit is contained in:
Jérôme Lebleu 2015-09-03 14:04:47 +02:00
commit cc08adcfd3
3 changed files with 11 additions and 0 deletions

7
data/apps/helpers Normal file
View file

@ -0,0 +1,7 @@
# -*- shell-script -*-
# TODO : use --regex to validate against a namespace
for helper in $(run-parts --list /usr/share/yunohost/apps/helpers.d 2>/dev/null) ; do
[ -r $helper ] && . $helper || true
done

View file

@ -0,0 +1,3 @@
ynh_password() {
echo $(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p')
}

1
debian/install vendored
View file

@ -2,5 +2,6 @@ bin/* /usr/bin/
data/actionsmap/* /usr/share/moulinette/actionsmap/ data/actionsmap/* /usr/share/moulinette/actionsmap/
data/hooks/* /usr/share/yunohost/hooks/ data/hooks/* /usr/share/yunohost/hooks/
data/other/* /usr/share/yunohost/yunohost-config/moulinette/ data/other/* /usr/share/yunohost/yunohost-config/moulinette/
data/apps/* /usr/share/yunohost/apps/
lib/yunohost/*.py /usr/lib/moulinette/yunohost/ lib/yunohost/*.py /usr/lib/moulinette/yunohost/
locales/* /usr/lib/moulinette/yunohost/locales/ locales/* /usr/lib/moulinette/yunohost/locales/