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
fb90eba7
Commit
fb90eba7
authored
8 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make shellcheck more happy
parent
a0be2778
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
25 additions
and
15 deletions
+25
-15
distr_info
bin/distr_info
+1
-1
epm
bin/epm
+2
-2
epm-addrepo
bin/epm-addrepo
+1
-1
epm-print
bin/epm-print
+5
-5
epm-removerepo
bin/epm-removerepo
+1
-1
epm-requires
bin/epm-requires
+1
-1
epm-search
bin/epm-search
+1
-1
epm-upgrade
bin/epm-upgrade
+1
-1
serv-status
bin/serv-status
+2
-2
check_code.sh
check_code.sh
+10
-0
No files found.
bin/distr_info
View file @
fb90eba7
...
@@ -33,7 +33,7 @@ rpmvendor()
...
@@ -33,7 +33,7 @@ rpmvendor()
[
"
$DISTRIB_ID
"
=
"LinuxXP"
]
&&
echo
"lxp"
&&
return
[
"
$DISTRIB_ID
"
=
"LinuxXP"
]
&&
echo
"lxp"
&&
return
[
"
$DISTRIB_ID
"
=
"TinyCoreLinux"
]
&&
echo
"tcl"
&&
return
[
"
$DISTRIB_ID
"
=
"TinyCoreLinux"
]
&&
echo
"tcl"
&&
return
[
"
$DISTRIB_ID
"
=
"VoidLinux"
]
&&
echo
"void"
&&
return
[
"
$DISTRIB_ID
"
=
"VoidLinux"
]
&&
echo
"void"
&&
return
echo
"
$DISTRIB_ID
"
|
tr
"
[A-Z]"
"[a-z]
"
echo
"
$DISTRIB_ID
"
|
tr
"
A-Z"
"a-z
"
}
}
# Translate DISTRIB_ID name to package manner (like in the package release name)
# Translate DISTRIB_ID name to package manner (like in the package release name)
...
...
This diff is collapsed.
Click to expand it.
bin/epm
View file @
fb90eba7
...
@@ -356,7 +356,7 @@ check_option()
...
@@ -356,7 +356,7 @@ check_option()
check_filenames
()
check_filenames
()
{
{
local
opt
local
opt
for
opt
in
$*
;
do
for
opt
in
"
$@
"
;
do
# files can be with full path or have extension via .
# files can be with full path or have extension via .
if
[
-f
"
$opt
"
]
&&
echo
"
$opt
"
|
grep
-q
"[/
\.
]"
;
then
if
[
-f
"
$opt
"
]
&&
echo
"
$opt
"
|
grep
-q
"[/
\.
]"
;
then
pkg_files
=
"
$pkg_files
$opt
"
pkg_files
=
"
$pkg_files
$opt
"
...
@@ -406,7 +406,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
...
@@ -406,7 +406,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
if
[
-z
"
$epm_cmd
"
]
;
then
if
[
-z
"
$epm_cmd
"
]
;
then
print_version
print_version
echo
echo
fatstr
=
"Unknown command in
$
@
arg(s)"
fatstr
=
"Unknown command in
$
*
arg(s)"
[
-n
"
$*
"
]
||
fatstr
=
"That program needs be running with some command"
[
-n
"
$*
"
]
||
fatstr
=
"That program needs be running with some command"
fatal
"
$fatstr
. Run
$ $PROGNAME
--help to get help."
fatal
"
$fatstr
. Run
$ $PROGNAME
--help to get help."
fi
fi
...
...
This diff is collapsed.
Click to expand it.
bin/epm-addrepo
View file @
fb90eba7
...
@@ -46,7 +46,7 @@ case $DISTRNAME in
...
@@ -46,7 +46,7 @@ case $DISTRNAME in
;;
;;
autoimports
)
autoimports
)
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
repo
=
"
$repo
.
$(
echo
"
$DISTRVERSION
"
|
tr
"
[A-Z]"
"[a-z]
"
)
"
repo
=
"
$repo
.
$(
echo
"
$DISTRVERSION
"
|
tr
"
A-Z"
"a-z
"
)
"
esac
esac
assure_exists apt-repo
assure_exists apt-repo
...
...
This diff is collapsed.
Click to expand it.
bin/epm-print
View file @
fb90eba7
...
@@ -76,7 +76,7 @@ print_pkgname()
...
@@ -76,7 +76,7 @@ print_pkgname()
print_srcname
()
print_srcname
()
{
{
print_name
$(
print_srcpkgname
"
$@
"
)
print_name
"
$(
print_srcpkgname
"
$@
"
)
"
}
}
print_specname
()
print_specname
()
...
@@ -137,7 +137,7 @@ EOF
...
@@ -137,7 +137,7 @@ EOF
"name"
)
"name"
)
[
-n
"
$1
"
]
||
fatal
"Arg is missed"
[
-n
"
$1
"
]
||
fatal
"Arg is missed"
if
[
-n
"
$FNFLAG
"
]
;
then
if
[
-n
"
$FNFLAG
"
]
;
then
print_name
$(
print_pkgname
"
$@
"
)
print_name
"
$(
print_pkgname
"
$@
"
)
"
elif
[
-n
"
$PKFLAG
"
]
;
then
elif
[
-n
"
$PKFLAG
"
]
;
then
query_package_field
"name"
"
$@
"
query_package_field
"name"
"
$@
"
else
else
...
@@ -147,7 +147,7 @@ EOF
...
@@ -147,7 +147,7 @@ EOF
"version"
)
"version"
)
[
-n
"
$1
"
]
||
fatal
"Arg is missed"
[
-n
"
$1
"
]
||
fatal
"Arg is missed"
if
[
-n
"
$FNFLAG
"
]
;
then
if
[
-n
"
$FNFLAG
"
]
;
then
print_version
$(
print_pkgname
"
$@
"
)
print_version
"
$(
print_pkgname
"
$@
"
)
"
elif
[
-n
"
$PKFLAG
"
]
;
then
elif
[
-n
"
$PKFLAG
"
]
;
then
query_package_field
"version"
"
$@
"
query_package_field
"version"
"
$@
"
else
else
...
@@ -157,7 +157,7 @@ EOF
...
@@ -157,7 +157,7 @@ EOF
"release"
)
"release"
)
[
-n
"
$1
"
]
||
fatal
"Arg is missed"
[
-n
"
$1
"
]
||
fatal
"Arg is missed"
if
[
-n
"
$FNFLAG
"
]
;
then
if
[
-n
"
$FNFLAG
"
]
;
then
print_release
$(
print_pkgname
"
$@
"
)
print_release
"
$(
print_pkgname
"
$@
"
)
"
elif
[
-n
"
$PKFLAG
"
]
;
then
elif
[
-n
"
$PKFLAG
"
]
;
then
query_package_field
"release"
"
$@
"
query_package_field
"release"
"
$@
"
else
else
...
@@ -222,6 +222,6 @@ epm_print()
...
@@ -222,6 +222,6 @@ epm_print()
{
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Missed args. Use epm print help for get help."
[
-n
"
$pkg_filenames
"
]
||
fatal
"Missed args. Use epm print help for get help."
__epm_print
$(
eval echo
$quoted_args
)
__epm_print
"
$(
eval echo
$quoted_args
)
"
}
}
This diff is collapsed.
Click to expand it.
bin/epm-removerepo
View file @
fb90eba7
...
@@ -27,7 +27,7 @@ case $DISTRNAME in
...
@@ -27,7 +27,7 @@ case $DISTRNAME in
autoimports
)
autoimports
)
info
"remove autoimports repo"
info
"remove autoimports repo"
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
repo
=
"
$repo
.
$(
echo
"
$DISTRVERSION
"
|
tr
"
[A-Z]"
"[a-z]
"
)
"
repo
=
"
$repo
.
$(
echo
"
$DISTRVERSION
"
|
tr
"
A-Z"
"a-z
"
)
"
;;
;;
esac
esac
...
...
This diff is collapsed.
Click to expand it.
bin/epm-requires
View file @
fb90eba7
...
@@ -44,7 +44,7 @@ epm_requires_files()
...
@@ -44,7 +44,7 @@ epm_requires_files()
epm_requires_names
()
epm_requires_names
()
{
{
local
pkg_names
=
"
$
@
"
local
pkg_names
=
"
$
*
"
local
CMD
local
CMD
[
-n
"
$pkg_names
"
]
||
return
[
-n
"
$pkg_names
"
]
||
return
...
...
This diff is collapsed.
Click to expand it.
bin/epm-search
View file @
fb90eba7
...
@@ -132,7 +132,7 @@ __epm_search_make_grep()
...
@@ -132,7 +132,7 @@ __epm_search_make_grep()
#list=$(strip_spaces $list | sed -e "s/ /|/g")
#list=$(strip_spaces $list | sed -e "s/ /|/g")
listN
=
$(
strip_spaces
$listN
|
sed
-e
"s/ /|/g"
|
sed
-e
"s/
\^
//g"
)
listN
=
$(
strip_spaces
$listN
|
sed
-e
"s/ /|/g"
|
sed
-e
"s/
\^
//g"
)
if
[
"
$short
"
]
;
then
if
[
-n
"
$short
"
]
;
then
echon
" | sed -e
\"
s| .*||g
\"
"
echon
" | sed -e
\"
s| .*||g
\"
"
fi
fi
...
...
This diff is collapsed.
Click to expand it.
bin/epm-upgrade
View file @
fb90eba7
...
@@ -81,7 +81,7 @@ epm_upgrade()
...
@@ -81,7 +81,7 @@ epm_upgrade()
;;
;;
homebrew
)
homebrew
)
#CMD="brew upgrade"
#CMD="brew upgrade"
docmd
"brew upgrade
`
brew outdated
`
"
docmd
"brew upgrade
$(
brew outdated
)
"
return
return
;;
;;
ipkg
)
ipkg
)
...
...
This diff is collapsed.
Click to expand it.
bin/serv-status
View file @
fb90eba7
...
@@ -61,13 +61,13 @@ is_service_autostart()
...
@@ -61,13 +61,13 @@ is_service_autostart()
LANG
=
C
$SUDO
chkconfig
$1
--list
|
grep
-q
"[35]:on"
LANG
=
C
$SUDO
chkconfig
$1
--list
|
grep
-q
"[35]:on"
;;
;;
service-initd|service-update
)
service-initd|service-update
)
test
-L
$(
echo
/etc/rc5.d/S??
$1
)
test
-L
"
$(
echo
/etc/rc5.d/S??
$1
)
"
;;
;;
systemd
)
systemd
)
$SUDO
systemctl is-enabled
$1
$SUDO
systemctl is-enabled
$1
;;
;;
runit
)
runit
)
test
-L
/var/service/
$SERVICE
test
-L
"/var/service/
$SERVICE
"
;;
;;
*
)
*
)
fatal
"Have no suitable command for
$SERVICETYPE
"
fatal
"Have no suitable command for
$SERVICETYPE
"
...
...
This diff is collapsed.
Click to expand it.
check_code.sh
View file @
fb90eba7
...
@@ -3,5 +3,15 @@
...
@@ -3,5 +3,15 @@
# http://mywiki.wooledge.org/Bashism
# http://mywiki.wooledge.org/Bashism
# https://wiki.ubuntu.com/DashAsBinSh
# https://wiki.ubuntu.com/DashAsBinSh
EXCL
=
-eSC2086
,SC2039,SC2034,SC2068,SC2155
if
[
-n
"
$1
"
]
;
then
shellcheck
$EXCL
"
$1
"
exit
fi
checkbashisms
-f
bin/
*
checkbashisms
-f
bin/
*
checkbashisms
-f
Makefile
checkbashisms
-f
Makefile
shellcheck
$EXCL
\
bin/epm bin/distr_info bin/epm-
*
bin/serv-
*
bin/tools_
*
This diff is collapsed.
Click to expand it.
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