3
# Copyright (C) 2015, 2017, 2019, 2020, 2022 Etersoft
4
# Copyright (C) 2015, 2017, 2019, 2020, 2022 Vitaly Lipatov <lav@etersoft.ru>
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
25
local psdir="$CONFIGDIR/prescription.d"
27
if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
30
<receipt> - run <receipt>
31
--list-all - list all available receipts
36
if [ "$1" = "--list-all" ] || [ -z "$*" ] ; then
37
[ -n "$short" ] || [ -n "$quiet" ] || echo "Run with a name of a prescription to run:"
38
__epm_play_list $psdir
45
__check_play_script "$prescription" || fatal "We have no idea how to play $prescription (checked in $psdir)"
46
__epm_play_run "$prescription" --run "$@" || fatal "There was some error during run the script."