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
a9d1dc90
Commit
a9d1dc90
authored
Mar 31, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-play: add --quiet support, rewrite help
parent
d17c5330
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
20 deletions
+25
-20
epm-play
bin/epm-play
+25
-20
No files found.
bin/epm-play
View file @
a9d1dc90
...
...
@@ -85,20 +85,27 @@ __epm_play_run()
docmd bash
$bashopt
$script
"
$@
"
}
__epm_play_help
()
{
cat
<<
EOF
Usage: epm play [options] [<app>]
Options:
<app> - install <app>
--remove <app> - uninstall <app>
--update [<app>|all] - update <app> (or all installed apps) if there is new version
--list - list all installed apps
--list-all - list all available apps
--short (with --list) - list names only"
--installed <app> - check if the app is installed"
EOF
}
epm_play
()
{
local
psdir
=
"
$(
realpath
$CONFIGDIR
/play.d
)
"
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
cat
<<
EOF
Options:
APP - install APP
--remove APP - remove APP
--list - list all installed apps
--list-all - list all available apps
--short - print only names
--update [APP|all] - update APP (or all installed apps) if there is new version
EOF
__epm_play_help
exit
fi
...
...
@@ -155,11 +162,12 @@ if [ "$1" = "--list" ] ; then
done
exit
fi
echo
"Installed:"
[
-n
"
$quiet
"
]
||
echo
"Installed:"
for
i
in
$(
__list_installed_app
)
;
do
local
desc
=
"
$(
__get_app_description
$psdir
/
$i
.sh
)
"
[
-n
"
$desc
"
]
||
continue
printf
" %-20s - %s
\n
"
"
$i
"
"
$desc
"
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$i
"
"
$desc
"
done
exit
fi
...
...
@@ -177,23 +185,20 @@ if [ "$1" = "--list-all" ] || [ -z "$*" ] ; then
done
exit
fi
echo
"Run with a name of a play script to run:"
[
-n
"
$quiet
"
]
||
echo
"Run with a name of a play script to run:"
for
i
in
$psdir
/
*
.sh
;
do
local
desc
=
"
$(
__get_app_description
$i
)
"
[
-n
"
$desc
"
]
||
continue
local
name
=
$(
basename
$i
.sh
)
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
printf
" %-20s - %s
\n
"
"
$name
"
"
$desc
"
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$name
"
"
$desc
"
done
[
-n
"
$quiet
"
]
||
[
-n
"
$*
"
]
&&
exit
echo
echo
"run epm play"
echo
" --list - list installed apps"
echo
" --list-all (default) - list all apps"
echo
" --remove <app> - remove <app>"
echo
" --update <app>|all - update <app> or all installed apps"
echo
" --installed <app> - check if the app is installed"
echo
" --short (with --list) - list names only"
#echo "Run epm play --help for help"
__epm_play_help
exit
fi
...
...
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