Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cb93452

Browse files
committed
Fix error exit codes
1 parent f201f2d commit cb93452

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

‎scripts/build

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,22 @@ function createIsoImage() {
141141

142142
# Create EFI boot image
143143
createEfiImage || exit $?
144-
cp $EFIBOOT_IMG $STEP_DIR || exit 41
144+
cp $EFIBOOT_IMG $STEP_DIR || exit 42
145145

146146
# Copy IsoLinux files
147147

148148
cp $SRC_DIR/bios/core/isolinux.bin \
149149
$SRC_DIR/bios/com32/elflink/ldlinux/ldlinux.c32 \
150-
$STEP_DIR || exit 42
150+
$STEP_DIR || exit 43
151151

152152
# Copy kernel and initramfs on the ISO image
153153

154154
cp $KERNEL $STEP_DIR/kernel.img &&
155-
cp $INITRAMFS $STEP_DIR/initram.gz || exit 43
155+
cp $INITRAMFS $STEP_DIR/initram.gz || exit 44
156156

157157
# Create ISO image
158158

159-
mkdir -p `dirname $OUTPUT` || exit 44
159+
mkdir -p `dirname $OUTPUT` || exit 45
160160

161161
# http://wiki.osdev.org/Bootable_El-Torito_CD_with_GRUB_Legacy#Mkisofs_says_Uh_oh.2C_I_cant_find_the_boot_image
162162
# genisoimage looks for its boot image as a subdirectory of the filesystem on the CD
@@ -170,9 +170,9 @@ function createIsoImage() {
170170
-eltorito-alt-boot \
171171
-efi-boot efiboot.img \
172172
-no-emul-boot \
173-
$STEP_DIR || exit 45
173+
$STEP_DIR || exit 46
174174

175-
$SRC_DIR/bios/utils/isohybrid $OUTPUT || exit 46
175+
$SRC_DIR/bios/utils/isohybrid $OUTPUT || exit 47
176176
}
177177

178178

@@ -182,7 +182,7 @@ case $MACHINE in
182182
img) # FAT partition
183183
STEP_DIR=$IMG_DIR
184184

185-
mkdir -p $STEP_DIR || err 70
185+
mkdir -p $STEP_DIR || err 50
186186

187187
# Copy SysLinux files
188188

@@ -191,7 +191,7 @@ case $MACHINE in
191191

192192
createPartitionImage || exit $?
193193

194-
$SRC_DIR/bios/mtools/syslinux --install $OUTPUT || exit 72
194+
$SRC_DIR/bios/mtools/syslinux --install $OUTPUT || exit 52
195195
;;
196196

197197
iso) # Hybrid ISO image for CDs and USB pendrives
@@ -203,15 +203,15 @@ case $MACHINE in
203203
tar) # Combine both barebones and initramfs tarfiles in a single one
204204
STEP_DIR=$OUTPUT
205205

206-
mkdir -p `dirname $STEP_DIR` || err 80
206+
mkdir -p `dirname $STEP_DIR` || err 60
207207

208208
gunzip $BAREBONES -c | tar --delete init | gzip > $STEP_DIR &&
209-
cat $INITRAMFS >> $STEP_DIR || err 81
209+
cat $INITRAMFS >> $STEP_DIR || err 61
210210
;;
211211

212212
*)
213213
echo -e "${RED}Unknown FORMAT '$FORMAT'${CLR}"
214-
exit 90
214+
exit 70
215215
;;
216216
esac
217217
;;
@@ -221,32 +221,32 @@ case $MACHINE in
221221
img)
222222
STEP_DIR=$IMG_DIR
223223

224-
mkdir -p $STEP_DIR || err 100
224+
mkdir -p $STEP_DIR || err 80
225225

226226
# Copy Raspberry PI extra files
227227
# http://elinux.org/RPi_Advanced_Setup#Setting_up_the_boot_partition
228228
#
229229
# bootcode.bin, start.elf, cmdline.txt
230230
(
231-
cd $STEP_DIR || exit 101
231+
cd $STEP_DIR || exit 81
232232

233-
wget https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin || exit 102
234-
wget https://github.com/raspberrypi/firmware/raw/master/boot/start.elf || exit 103
233+
wget https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin || exit 82
234+
wget https://github.com/raspberrypi/firmware/raw/master/boot/start.elf || exit 83
235235
) || err $?
236236

237237
createPartitionImage || exit $?
238238
;;
239239

240240
*)
241241
echo -e "${RED}Unknown FORMAT '$FORMAT'${CLR}"
242-
exit 110
242+
exit 90
243243
;;
244244
esac
245245
;;
246246

247247
*)
248248
echo -e "${RED}Unknown MACHINE '$MACHINE'${CLR}"
249-
exit 120
249+
exit 100
250250
;;
251251
esac
252252

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /