Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guido Gunther
image-builder
Commits
576437a5
Commit
576437a5
authored
Jun 18, 2019
by
Guido Gunther
Browse files
root.sh: Quote more variables
parent
f9e60b5b
Changes
1
Show whitespace changes
Inline
Side-by-side
root.sh
View file @
576437a5
...
...
@@ -58,7 +58,7 @@ function setup_kernel()
mkdir
-p
"
${
basedir
}
/boot/dtbs"
case
"
${
pureos_board
}
"
in
imx6
)
fdt_source
=
"
${
basedir
}
"
/usr/lib/linux-image-
*
/
"
${
fdt_file
}
"
fdt_source
=
"
${
basedir
}
/usr/lib/linux-image-*/
${
fdt_file
}
"
link
=
$(
basename
"
${
basedir
}
"
/boot/vmlinuz-
*
)
rm
-f
"
${
basedir
}
/boot/zImage"
ln
-s
"
${
link
}
"
"
${
basedir
}
/boot/zImage"
...
...
@@ -66,16 +66,16 @@ function setup_kernel()
cp
"
${
basedir
}
/boot/zImage"
"tmp/"
;;
ec-som|imx8
)
fdt_source
=
"
${
basedir
}
"
/usr/lib/linux-image-
*
/freescale/
"
${
fdt_file
}
"
fdt_source
=
"
${
basedir
}
/usr/lib/linux-image-*/freescale/
${
fdt_file
}
"
cp
"
${
basedir
}
/boot/
${
link
}
"
"
${
basedir
}
/boot/Image.gz"
gunzip
"
${
basedir
}
/boot/Image.gz"
;;
devkit
*
)
# Reconfigure kernel package to trigger kernel hooks
chroot
"
${
basedir
}
"
dpkg-reconfigure
$(
basename
${
kernel_deb
%%_*
}
)
chroot
"
${
basedir
}
"
dpkg-reconfigure
"
$(
basename
"
${
kernel_deb
%%_*
}
"
)
"
;;
esac
[
-z
"
${
fdt_source
}
"
]
||
cp
${
fdt_source
}
"
${
basedir
}
/boot/dtbs/"
[
-z
"
${
fdt_source
}
"
]
||
cp
"
${
fdt_source
}
"
"
${
basedir
}
/boot/dtbs/"
}
...
...
@@ -122,8 +122,8 @@ function check_patched()
for
pkg
in
${
patched
}
;
do
# Not all architectures have all packages, so check this first
if
chroot
"
${
basedir
}
"
dpkg
-s
${
pkg
}
;
then
if
!
chroot
"
${
basedir
}
"
dpkg
-s
${
pkg
}
|
grep
-qs
"^Version: .*pureos"
;
then
if
chroot
"
${
basedir
}
"
dpkg
-s
"
${
pkg
}
"
;
then
if
!
chroot
"
${
basedir
}
"
dpkg
-s
"
${
pkg
}
"
|
grep
-qs
"^Version: .*pureos"
;
then
echo
"
${
pkg
}
is not a patched version."
exit
1
fi
...
...
@@ -242,7 +242,7 @@ EOF
cat
<<
EOF
> "
${
basedir
}
/etc/apt/sources.list.d/ci.list"
deb http://ci.puri.sm/ scratch librem5
EOF
cat
data/ci-repo.key |
chroot
${
basedir
}
apt-key add -
cat
data/ci-repo.key |
chroot
"
${
basedir
}
"
apt-key add -
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