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
b9bfcc89
Commit
b9bfcc89
authored
Apr 02, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: separate list code to a functions
parent
a6e7fb21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
37 deletions
+51
-37
epm-play
bin/epm-play
+51
-37
No files found.
bin/epm-play
View file @
b9bfcc89
...
...
@@ -85,6 +85,53 @@ __epm_play_run()
docmd bash
$bashopt
$script
"
$@
"
}
__epm_play_list_installed
()
{
local
i
if
[
-n
"
$short
"
]
;
then
for
i
in
$(
__list_installed_app
)
;
do
echo
"
$i
"
done
exit
fi
[
-n
"
$quiet
"
]
||
echo
"Installed applications:"
for
i
in
$(
__list_installed_app
)
;
do
local
desc
=
"
$(
__get_app_description
$psdir
/
$i
.sh
)
"
[
-n
"
$desc
"
]
||
continue
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$i
"
"
$desc
"
done
}
__epm_play_list
()
{
local
psdir
=
"
$1
"
local
i
local
IGNOREi586
[
"
$(
$DISTRVENDOR
-a
)
"
=
"x86_64"
]
&&
IGNOREi586
=
''
||
IGNOREi586
=
1
if
[
-n
"
$short
"
]
;
then
for
i
in
$psdir
/
*
.sh
;
do
local
name
=
$(
basename
$i
.sh
)
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
echo
"
$name
"
done
exit
fi
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
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$name
"
"
$desc
"
done
}
__epm_play_help
()
{
cat
<<
EOF
...
...
@@ -150,51 +197,18 @@ fi
if
[
"
$1
"
=
"--installed"
]
;
then
shift
__check_installed_app
"
$1
"
#[ -n "$quiet" ] && exit
exit
fi
if
[
"
$1
"
=
"--list"
]
;
then
shift
local
i
if
[
-n
"
$short
"
]
;
then
for
i
in
$(
__list_installed_app
)
;
do
echo
"
$i
"
done
exit
fi
[
-n
"
$quiet
"
]
||
echo
"Installed:"
for
i
in
$(
__list_installed_app
)
;
do
local
desc
=
"
$(
__get_app_description
$psdir
/
$i
.sh
)
"
[
-n
"
$desc
"
]
||
continue
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$i
"
"
$desc
"
done
__epm_play_list_installed
exit
fi
[
"
$(
$DISTRVENDOR
-a
)
"
=
"x86_64"
]
&&
IGNOREi586
=
''
||
IGNOREi586
=
1
if
[
"
$1
"
=
"--list-all"
]
||
[
-z
"
$*
"
]
;
then
local
i
if
[
-n
"
$short
"
]
;
then
for
i
in
$psdir
/
*
.sh
;
do
local
name
=
$(
basename
$i
.sh
)
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
echo
"
$name
"
done
exit
fi
[
-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
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$name
"
"
$desc
"
done
[
-n
"
$short
"
]
||
[
-n
"
$quiet
"
]
||
echo
"Available applications:"
__epm_play_list
$psdir
[
-n
"
$quiet
"
]
||
[
-n
"
$*
"
]
&&
exit
echo
#echo "Run epm play --help for help"
...
...
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