git://git.onelab.eu
/
bootcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1d27d76
)
turns out that [ -f ] returns true in bash !
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Fri, 29 Nov 2019 14:09:13 +0000
(15:09 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Sun, 1 Dec 2019 19:13:52 +0000
(20:13 +0100)
prep.sh
patch
|
blob
|
history
diff --git
a/prep.sh
b/prep.sh
index
4b851de
..
c9308da
100755
(executable)
--- a/
prep.sh
+++ b/
prep.sh
@@
-128,7
+128,7
@@
install -d -m 755 $isofs
# Copy the kernel out
echo "* BootCD - locating kernel"
for kernel in $bootcd/boot/vmlinuz-* ; do
# Copy the kernel out
echo "* BootCD - locating kernel"
for kernel in $bootcd/boot/vmlinuz-* ; do
- if [ -f
$kernel
] ; then
+ if [ -f
"$kernel"
] ; then
echo "* BootCD kernel (1) creating from $kernel"
echo "* kernel created (1) from $kernel" > $isofs/kernel.from
install -D -m 644 $kernel $isofs/kernel
echo "* BootCD kernel (1) creating from $kernel"
echo "* kernel created (1) from $kernel" > $isofs/kernel.from
install -D -m 644 $kernel $isofs/kernel
@@
-160,7
+160,7
@@
done
# second chance if first approach would not work
if [ ! -f $isofs/kernel ] ; then
kernel=$(find $bootcd/boot -name linux)
# second chance if first approach would not work
if [ ! -f $isofs/kernel ] ; then
kernel=$(find $bootcd/boot -name linux)
- if [ -f
$kernel
] ; then
+ if [ -f
"$kernel"
] ; then
echo "* BootCD kernel (2) creating from $kernel"
echo "* kernel created (2) from $kernel" > $isofs/kernel.from
install -D -m 644 $kernel $isofs/kernel
echo "* BootCD kernel (2) creating from $kernel"
echo "* kernel created (2) from $kernel" > $isofs/kernel.from
install -D -m 644 $kernel $isofs/kernel