Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nurlan
eepm
Commits
a8dc5a5f
Commit
a8dc5a5f
authored
Apr 02, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm prescription: implement via epm play functions
parent
fcef1a06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
45 deletions
+12
-45
epm-prescription
bin/epm-prescription
+12
-45
No files found.
bin/epm-prescription
View file @
a8dc5a5f
#!/bin/sh
#!/bin/sh
#
#
# Copyright (C) 2015, 2017, 2019, 2020 Etersoft
# Copyright (C) 2015, 2017, 2019, 2020
, 2022
Etersoft
# Copyright (C) 2015, 2017, 2019, 2020 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2015, 2017, 2019, 2020
, 2022
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# it under the terms of the GNU Affero General Public License as published by
...
@@ -17,28 +17,7 @@
...
@@ -17,28 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
# TODO
load_helper epm-play
epm_vardir
=
/var/lib/eepm
__epm_prescription_run
()
{
local
script
=
"
$psdir
/
$1
.sh"
shift
local
option
=
"
$1
"
if
[
!
-x
"
$script
"
]
;
then
fatal
"Can't find
$script
prescription."
fi
# allow use EGET in the scripts
__set_EGET
# also we will have DISTRVENDOR there
export
PATH
=
$PROGDIR
:
$PATH
#info "Running $($script --description 2>/dev/null) ..."
docmd
$script
$option
}
epm_prescription
()
epm_prescription
()
{
{
...
@@ -48,34 +27,22 @@ local psdir="$CONFIGDIR/prescription.d"
...
@@ -48,34 +27,22 @@ local psdir="$CONFIGDIR/prescription.d"
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
cat
<<
EOF
cat
<<
EOF
Options:
Options:
<receipt> - run
receipt
<receipt> - run
<receipt>
--list-all - list all available receipts
--list-all - list all available receipts
EOF
EOF
exit
exit
fi
fi
[
"
$(
$DISTRVENDOR
-a
)
"
=
"x86_64"
]
&&
IGNOREi586
=
''
||
IGNOREi586
=
1
if
[
"
$1
"
==
"--list-all"
]
||
[
-z
"
$*
"
]
;
then
if
[
"
$1
"
==
"--list-all"
]
||
[
-z
"
$*
"
]
;
then
if
[
-n
"
$short
"
]
;
then
[
-n
"
$short
"
]
||
[
-n
"
$quiet
"
]
||
echo
"Run with a name of a prescription to run:"
for
i
in
$psdir
/
*
.sh
;
do
__epm_play_list
$psdir
local
name
=
$(
basename
$i
.sh
)
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
echo
"
$name
"
done
exit
fi
echo
"Run with a name of a prescription to run:"
for
i
in
$psdir
/
*
.sh
;
do
local
name
=
$(
basename
$i
.sh
)
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
printf
" %-20s - %s
\n
"
"
$name
"
"
$(
$i
--description
2>/dev/null
)
"
done
echo
exit
exit
fi
fi
__epm_prescription_run
"
$1
"
--run
prescription
=
"
$1
"
shift
__check_play_script
"
$prescription
"
||
fatal
"We have no idea how to play
$prescription
(checked in
$psdir
)"
__epm_play_run
"
$prescription
"
--run
"
$@
"
||
fatal
"There was some error during run the script."
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment