Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FFS Gluon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
firmware
FFS Gluon
Commits
dd76e089
Unverified
Commit
dd76e089
authored
Sep 30, 2019
by
Jan-Tarek Butt
Committed by
Matthias Schiffer
Dec 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
treewide: solve shellcheck warnings
parent
4e070312
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
26 additions
and
23 deletions
+26
-23
contrib/depdot.sh
contrib/depdot.sh
+1
-2
contrib/lsupgrade.sh
contrib/lsupgrade.sh
+2
-1
contrib/sign.sh
contrib/sign.sh
+1
-1
contrib/sigtest.sh
contrib/sigtest.sh
+2
-2
package/gluon-core/files/lib/netifd/proto/gluon_wired.sh
package/gluon-core/files/lib/netifd/proto/gluon_wired.sh
+1
-0
package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode
...setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode
+2
-2
package/gluon-setup-mode/files/lib/preinit/90_setup_mode
package/gluon-setup-mode/files/lib/preinit/90_setup_mode
+1
-1
scripts/features.sh
scripts/features.sh
+6
-5
scripts/filesize.sh
scripts/filesize.sh
+1
-1
scripts/modules.sh
scripts/modules.sh
+1
-0
scripts/patch.sh
scripts/patch.sh
+1
-1
scripts/sha256sum.sh
scripts/sha256sum.sh
+1
-1
scripts/sha512sum.sh
scripts/sha512sum.sh
+1
-1
scripts/update-patches.sh
scripts/update-patches.sh
+2
-2
scripts/update.sh
scripts/update.sh
+3
-3
No files found.
contrib/depdot.sh
View file @
dd76e089
...
...
@@ -5,8 +5,7 @@
# * Works only if directory names and package names are the same (true for all Gluon packages)
# * Doesn't show dependencies through virtual packages correctly
set
-e
shopt
-s
nullglob
...
...
contrib/lsupgrade.sh
View file @
dd76e089
#!/bin/bash
set
-e
# Script to list all upgrade scripts in a clear manner
# Limitations:
# * Does only show scripts of packages whose `files'/`luasrc' directories represent the whole image filesystem (which are all Gluon packages)
...
...
@@ -27,7 +28,7 @@ fi
pushd
"
$(
dirname
"
$0
"
)
/.."
>
/dev/null
find ./package packages
-name
Makefile |
while
read
makefile
;
do
find ./package packages
-name
Makefile |
while
read
-r
makefile
;
do
dir
=
"
$(
dirname
"
$makefile
"
)
"
pushd
"
$dir
"
>
/dev/null
...
...
contrib/sign.sh
View file @
dd76e089
...
...
@@ -2,7 +2,7 @@
set
-e
if
[
$#
-ne
2
-o
"-h"
=
"
$1
"
-o
"--help"
=
"
$1
"
-o
!
-r
"
$1
"
-o
!
-r
"
$2
"
]
;
then
if
[
$#
-ne
2
]
||
[
"-h"
=
"
$1
"
]
||
[
"--help"
=
"
$1
"
]
||
[
!
-r
"
$1
"
]
||
[
!
-r
"
$2
"
]
;
then
cat
<<
EOHELP
Usage:
$0
<secret> <manifest>
...
...
contrib/sigtest.sh
View file @
dd76e089
#!/bin/sh
if
[
$#
-eq
0
-o
"-h"
=
"
$1
"
-o
"-help"
=
"
$1
"
-o
"--help"
=
"
$1
"
]
;
then
if
[
$#
-eq
0
]
||
[
"-h"
=
"
$1
"
]
||
[
"-help"
=
"
$1
"
]
||
[
"--help"
=
"
$1
"
]
;
then
cat
<<
EOHELP
Usage:
$0
<public> <signed manifest>
...
...
@@ -27,7 +27,7 @@ awk "BEGIN { sep=0 }
else print >
\"
$lower
\"
}"
\
"
$manifest
"
while
read
line
while
read
-r
line
do
if
ecdsaverify
-s
"
$line
"
-p
"
$public
"
"
$upper
"
;
then
ret
=
0
...
...
package/gluon-core/files/lib/netifd/proto/gluon_wired.sh
View file @
dd76e089
...
...
@@ -14,6 +14,7 @@ xor2() {
echo
-n
"
${
1
:1:1
}
"
|
tr
'0123456789abcdef'
'23016745ab89efcd'
}
# shellcheck disable=SC2086
interface_linklocal
()
{
local
macaddr
=
"
$(
ubus call network.device status
'{"name": "'
"
$1
"
'"}'
| jsonfilter
-e
'@.macaddr'
)
"
local
oldIFS
=
"
$IFS
"
;
IFS
=
':'
;
set
--
$macaddr
;
IFS
=
"
$oldIFS
"
...
...
package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode
View file @
dd76e089
...
...
@@ -12,7 +12,7 @@ wait_setup_mode() {
}
if
[
"
$BUTTON
"
=
wps
-o
"
$BUTTON
"
=
reset
-o
"
$BUTTON
"
=
phone
]
;
then
if
[
"
$BUTTON
"
=
wps
]
||
[
"
$BUTTON
"
=
reset
]
||
[
"
$BUTTON
"
=
phone
]
;
then
case
"
$ACTION
"
in
pressed
)
wait_setup_mode &
...
...
@@ -21,7 +21,7 @@ if [ "$BUTTON" = wps -o "$BUTTON" = reset -o "$BUTTON" = phone ]; then
;;
released
)
if
[
-r
/tmp/.wait_setup_mode
]
;
then
kill
$(
cat
/tmp/.wait_setup_mode
)
kill
"
$(
cat
/tmp/.wait_setup_mode
)
"
rm
/tmp/.wait_setup_mode
fi
;;
...
...
package/gluon-setup-mode/files/lib/preinit/90_setup_mode
View file @
dd76e089
...
...
@@ -5,7 +5,7 @@ setup_mode_enable() {
local
enabled
=
"
$(
uci
-q
get
'gluon-setup-mode.@setup_mode[0].enabled'
)
"
local
configured
=
"
$(
uci
-q
get
'gluon-setup-mode.@setup_mode[0].configured'
)
"
if
[
"
$enabled
"
=
1
-o
"
$configured
"
!=
1
]
;
then
if
[
"
$enabled
"
=
1
]
||
[
"
$configured
"
!=
1
]
;
then
echo
'/lib/gluon/setup-mode/rc.d'
>
/tmp/rc_d_path
fi
}
...
...
scripts/features.sh
View file @
dd76e089
...
...
@@ -31,14 +31,14 @@ sanitize() {
echo
-n
"
$v
"
}
vars
=
vars
=
()
for
feature
in
$1
;
do
if
[
"
$(
type
-t
gluon_feature_nodefault_
${
feature
}
)
"
!=
'function'
]
;
then
if
[
"
$(
type
-t
"gluon_feature_nodefault_
${
feature
}
"
)
"
!=
'function'
]
;
then
echo
"gluon-
${
feature
}
"
fi
vars
=
"
$vars
$(
sanitize
"
$feature
"
)
=1"
vars
+
=(
"
$(
sanitize
"
$feature
"
)
=1"
)
done
...
...
@@ -46,18 +46,19 @@ nodefault() {
:
}
# shellcheck disable=SC2086
packages
()
{
local
cond
=
"
$(
sanitize
"
$1
"
)
"
shift
# We only allow variable names, parentheses and the operators: & | !
if
[
"
$(
expr
match
"
$cond
"
'.*[^A-Za-z0-9_()&|! ].*'
)
"
-gt
0
]
;
then
if
grep
-q
'[^A-Za-z0-9_()&|! ]'
<<<
"
$cond
"
;
then
exit
1
fi
# Let will return false when the result of the passed expression is 0,
# so we always add 1. This way false is only returned for syntax errors.
local
ret
=
"
$(
env
-i
$vars
bash
--norc
-ec
"let _result_='1+(
$cond
)'; echo -n
\"\$
_result_
\"
"
2>/dev/null
)
"
local
ret
=
"
$(
env
-i
"
${
vars
[@]
}
"
bash
--norc
-ec
"let _result_='1+(
$cond
)'; echo -n
\"\$
_result_
\"
"
2>/dev/null
)
"
case
"
$ret
"
in
2
)
for
pkg
in
"
$@
"
;
do
...
...
scripts/filesize.sh
View file @
dd76e089
#!/bin/sh
check_command
()
{
which
"
$1
"
>
/dev/null 2>&1
command
-v
"
$1
"
>
/dev/null
}
if
check_command gnustat
;
then
...
...
scripts/modules.sh
View file @
dd76e089
.
./modules
[
!
-f
"
$GLUON_SITEDIR
"
/modules
]
||
.
"
$GLUON_SITEDIR
"
/modules
# shellcheck disable=SC2086
FEEDS
=
"
$(
echo
$GLUON_FEEDS
$GLUON_SITE_FEEDS
|
tr
' '
'\n'
)
"
GLUON_MODULES
=
openwrt
...
...
scripts/patch.sh
View file @
dd76e089
...
...
@@ -3,7 +3,7 @@
set
-e
shopt
-s
nullglob
[
"
$GLUON_TMPDIR
"
-a
"
$GLUON_PATCHESDIR
"
]
||
exit
1
[
"
$GLUON_TMPDIR
"
]
&&
[
"
$GLUON_PATCHESDIR
"
]
||
exit
1
.
scripts/modules.sh
...
...
scripts/sha256sum.sh
View file @
dd76e089
#!/bin/sh
check_command
()
{
which
"
$1
"
>
/dev/null 2>&1
command
-v
"
$1
"
>
/dev/null 2>&1
}
if
check_command
sha256sum
;
then
...
...
scripts/sha512sum.sh
View file @
dd76e089
#!/bin/sh
check_command
()
{
which
"
$1
"
>
/dev/null 2>&1
command
-v
"
$1
"
>
/dev/null 2>&1
}
if
check_command
sha512sum
;
then
...
...
scripts/update-patches.sh
View file @
dd76e089
...
...
@@ -13,13 +13,13 @@ GLUONDIR="$(pwd)"
for
module
in
$GLUON_MODULES
;
do
echo
"--- Updating patches for module '
$module
' ---"
rm
-rf
"
${
GLUON_PATCHESDIR
}
/
$module
"
rm
-rf
"
${
GLUON_PATCHESDIR
:?
}
/
$module
"
cd
"
$GLUONDIR
"
/
"
$module
"
n
=
0
for
commit
in
$(
git rev-list
--reverse
--no-merges
base..patched
)
;
do
let
n
=
n+1
((
++n
))
mkdir
-p
"
${
GLUON_PATCHESDIR
}
/
$module
"
git
-c
core.abbrev
=
40 show
--pretty
=
format:
'From: %an <%ae>%nDate: %aD%nSubject: %B'
--no-renames
--binary
"
$commit
"
>
"
${
GLUON_PATCHESDIR
}
/
$module
/
$(
printf
'%04u'
$n
)
-
$(
git show
-s
--pretty
=
format:%f
"
$commit
"
)
.patch"
done
...
...
scripts/update.sh
View file @
dd76e089
...
...
@@ -10,9 +10,9 @@ GLUONDIR="$(pwd)"
for
module
in
$GLUON_MODULES
;
do
echo
"--- Updating module '
$module
' ---"
var
=
$(
echo
"
$module
"
|
tr
'[:lower:]/'
'[:upper:]_'
)
eval
repo
=
\$
{
${
var
}
_REPO
}
eval
branch
=
\$
{
${
var
}
_BRANCH
}
eval
commit
=
\$
{
${
var
}
_COMMIT
}
eval
'repo=${'
"
${
var
}
"
'_REPO}'
eval
'branch=${'
"
${
var
}
"
'_BRANCH}'
eval
'commit=${'
"
${
var
}
"
'_COMMIT}'
mkdir
-p
"
$GLUONDIR
/
$module
"
cd
"
$GLUONDIR
/
$module
"
...
...
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