-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Clean up scripts with shellcheck #77376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
79bf1c8
67b73b3
4701ac9
439c920
4755341
ab7bea4
fe2dc40
3216a6f
c640a44
f1605c0
540dc94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,10 @@ echo ERROR: An error was encountered with the build. | |
cat /tmp/build.log | ||
exit 1 | ||
" | ||
trap "$on_err" ERR | ||
trap '$on_err' ERR | ||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & | ||
PING_LOOP_PID=$! | ||
$@ &> /tmp/build.log | ||
"$@" &> /tmp/build.log | ||
trap - ERR | ||
kill $PING_LOOP_PID | ||
set -x | ||
|
@@ -31,35 +31,35 @@ exit 1 | |
# First up, build a cross-compiler | ||
git clone --depth=1 https://git.haiku-os.org/haiku | ||
git clone --depth=1 https://git.haiku-os.org/buildtools | ||
cd $BUILDTOOLS/jam | ||
cd "$BUILDTOOLS/jam" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, don't you also need to change lines 7 and 9 for this to do anything? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @pta2002, you marked this as resolved but didn't change the lines. If they don't need to be changed, can you explain why? |
||
hide_output make | ||
hide_output ./jam0 install | ||
mkdir -p $OUTPUT | ||
cd $OUTPUT | ||
hide_output $HAIKU/configure --build-cross-tools $ARCH $TOP/buildtools | ||
mkdir -p "$OUTPUT" | ||
cd "$OUTPUT" | ||
hide_output "$HAIKU/configure" --build-cross-tools "$ARCH" "$TOP/buildtools" | ||
|
||
# Set up sysroot to redirect to /system | ||
mkdir -p $SYSROOT/boot | ||
mkdir -p $PACKAGE_ROOT | ||
ln -s $PACKAGE_ROOT $SYSROOT/boot/system | ||
mkdir -p "$SYSROOT/boot" | ||
mkdir -p "$PACKAGE_ROOT" | ||
ln -s "$PACKAGE_ROOT" "$SYSROOT/boot/system" | ||
|
||
# Build needed packages and tools for the cross-compiler | ||
hide_output jam -q haiku.hpkg haiku_devel.hpkg '<build>package' | ||
|
||
# Set up our sysroot | ||
cp $OUTPUT/objects/linux/lib/*.so /lib/x86_64-linux-gnu | ||
cp $OUTPUT/objects/linux/x86_64/release/tools/package/package /bin/ | ||
find $SYSROOT/../bin/ -type f -exec ln -s {} /bin/ \; | ||
find "$SYSROOT/../bin/" -type f -exec ln -s {} /bin/ \; | ||
|
||
# Extract packages | ||
package extract -C $PACKAGE_ROOT $OUTPUT/objects/haiku/$ARCH/packaging/packages/haiku.hpkg | ||
package extract -C $PACKAGE_ROOT $OUTPUT/objects/haiku/$ARCH/packaging/packages/haiku_devel.hpkg | ||
package extract -C $PACKAGE_ROOT $OUTPUT/objects/haiku/"$ARCH"/packaging/packages/haiku.hpkg | ||
package extract -C $PACKAGE_ROOT $OUTPUT/objects/haiku/"$ARCH"/packaging/packages/haiku_devel.hpkg | ||
find $OUTPUT/download/ -name '*.hpkg' -exec package extract -C $PACKAGE_ROOT {} \; | ||
|
||
# Fix libgcc_s so we can link to it | ||
cd $PACKAGE_ROOT/develop/lib | ||
ln -s ../../lib/libgcc_s.so libgcc_s.so | ||
|
||
# Clean up | ||
rm -rf $BUILDTOOLS $HAIKU $OUTPUT/Jamfile $OUTPUT/attributes $OUTPUT/build \ | ||
$OUTPUT/build_packages $OUTPUT/download $OUTPUT/objects | ||
rm -rf "$BUILDTOOLS" "$HAIKU" "$OUTPUT"/Jamfile "$OUTPUT"/attributes "$OUTPUT"/build \ | ||
"$OUTPUT"/build_packages "$OUTPUT"/download "$OUTPUT"/objects |
Uh oh!
There was an error while loading. Please reload this page.