From 52c08c841ab534f32e8ea489b0668421826987d6 Mon Sep 17 00:00:00 2001 From: Oxore Date: Thu, 30 Jun 2022 12:07:35 +0300 Subject: Use /bin/bash, fix string comparison --- 1-download.sh | 2 +- 2-unpack.sh | 4 ++-- 3-build-binutils.sh | 4 ++-- 4-build-gcc-stage-1.sh | 4 ++-- 5-build-newlib.sh | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/1-download.sh b/1-download.sh index b865662..51d3c73 100644 --- a/1-download.sh +++ b/1-download.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e source ./common diff --git a/2-unpack.sh b/2-unpack.sh index 8f66bd4..f4ccf23 100644 --- a/2-unpack.sh +++ b/2-unpack.sh @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash source ./common set -e -function unpack() { +unpack() { if [ ! -d unpacked/$1 ]; then echo Unpacking $1.$2 tar xf download/$1.$2 -C unpacked diff --git a/3-build-binutils.sh b/3-build-binutils.sh index a370f86..0ef7969 100644 --- a/3-build-binutils.sh +++ b/3-build-binutils.sh @@ -1,11 +1,11 @@ -#!/bin/sh +#!/bin/bash source ./common options_do_configure=1 options_do_build=1 options_do_install=1 -if [ "$1" == "-i" ]; then +if [ "$1" = "-i" ]; then options_do_configure= options_do_build= options_do_install=1 diff --git a/4-build-gcc-stage-1.sh b/4-build-gcc-stage-1.sh index 3774ee2..47ad0f7 100644 --- a/4-build-gcc-stage-1.sh +++ b/4-build-gcc-stage-1.sh @@ -1,11 +1,11 @@ -#!/bin/sh +#!/bin/bash source ./common options_do_configure=1 options_do_build=1 options_do_install=1 -if [ "$1" == "-i" ]; then +if [ "$1" = "-i" ]; then options_do_configure= options_do_build= options_do_install=1 diff --git a/5-build-newlib.sh b/5-build-newlib.sh index 4cbf3a7..a3cddb8 100644 --- a/5-build-newlib.sh +++ b/5-build-newlib.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash source ./common export PATH="$prefix_dir/bin:${PATH:+:${PATH}}" @@ -6,7 +6,7 @@ options_do_configure=1 options_do_build=1 options_do_install=1 -if [ "$1" == "-i" ]; then +if [ "$1" = "-i" ]; then options_do_configure= options_do_build= options_do_install=1 -- cgit v1.2.3