diff --git a/Lab0/scripts/generate_bomb.sh b/Lab0/scripts/generate_bomb.sh index 134d6d77..5bddc03b 100755 --- a/Lab0/scripts/generate_bomb.sh +++ b/Lab0/scripts/generate_bomb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ -z $LABROOT ]]; then echo "Please set the LABROOT environment variable to the root directory of your project. (Makefile)" diff --git a/Lab3/user/chcore-libc/libchcore/cmake/do_cleanup.sh b/Lab3/user/chcore-libc/libchcore/cmake/do_cleanup.sh index f022ce21..0a9bae61 100644 --- a/Lab3/user/chcore-libc/libchcore/cmake/do_cleanup.sh +++ b/Lab3/user/chcore-libc/libchcore/cmake/do_cleanup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab3/user/chcore-libc/libchcore/cmake/do_override_dir.sh b/Lab3/user/chcore-libc/libchcore/cmake/do_override_dir.sh index bac69e4c..300a4be3 100644 --- a/Lab3/user/chcore-libc/libchcore/cmake/do_override_dir.sh +++ b/Lab3/user/chcore-libc/libchcore/cmake/do_override_dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab3/user/chcore-libc/libchcore/cmake/do_patch_dir.sh b/Lab3/user/chcore-libc/libchcore/cmake/do_patch_dir.sh index ac6d7c92..29202449 100644 --- a/Lab3/user/chcore-libc/libchcore/cmake/do_patch_dir.sh +++ b/Lab3/user/chcore-libc/libchcore/cmake/do_patch_dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab3/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh b/Lab3/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh index 6640077c..2477f5f5 100755 --- a/Lab3/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh +++ b/Lab3/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab3/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh b/Lab3/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh index 8b2dc13b..6fa3d103 100644 --- a/Lab3/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh +++ b/Lab3/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab3/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh b/Lab3/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh index 416bfb31..826e7b9f 100644 --- a/Lab3/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh +++ b/Lab3/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab3/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh b/Lab3/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh index b45a9055..9a7af38b 100644 --- a/Lab3/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh +++ b/Lab3/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab4/user/chcore-libc/libchcore/cmake/do_cleanup.sh b/Lab4/user/chcore-libc/libchcore/cmake/do_cleanup.sh index f022ce21..0a9bae61 100644 --- a/Lab4/user/chcore-libc/libchcore/cmake/do_cleanup.sh +++ b/Lab4/user/chcore-libc/libchcore/cmake/do_cleanup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab4/user/chcore-libc/libchcore/cmake/do_override_dir.sh b/Lab4/user/chcore-libc/libchcore/cmake/do_override_dir.sh index bac69e4c..300a4be3 100644 --- a/Lab4/user/chcore-libc/libchcore/cmake/do_override_dir.sh +++ b/Lab4/user/chcore-libc/libchcore/cmake/do_override_dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab4/user/chcore-libc/libchcore/cmake/do_patch_dir.sh b/Lab4/user/chcore-libc/libchcore/cmake/do_patch_dir.sh index ac6d7c92..29202449 100644 --- a/Lab4/user/chcore-libc/libchcore/cmake/do_patch_dir.sh +++ b/Lab4/user/chcore-libc/libchcore/cmake/do_patch_dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab4/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh b/Lab4/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh index 6640077c..2477f5f5 100755 --- a/Lab4/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh +++ b/Lab4/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab4/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh b/Lab4/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh index 8b2dc13b..6fa3d103 100644 --- a/Lab4/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh +++ b/Lab4/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab4/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh b/Lab4/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh index 416bfb31..826e7b9f 100644 --- a/Lab4/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh +++ b/Lab4/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab4/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh b/Lab4/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh index b45a9055..9a7af38b 100644 --- a/Lab4/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh +++ b/Lab4/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab5/user/chcore-libc/libchcore/cmake/do_cleanup.sh b/Lab5/user/chcore-libc/libchcore/cmake/do_cleanup.sh index f022ce21..0a9bae61 100644 --- a/Lab5/user/chcore-libc/libchcore/cmake/do_cleanup.sh +++ b/Lab5/user/chcore-libc/libchcore/cmake/do_cleanup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab5/user/chcore-libc/libchcore/cmake/do_override_dir.sh b/Lab5/user/chcore-libc/libchcore/cmake/do_override_dir.sh index bac69e4c..300a4be3 100644 --- a/Lab5/user/chcore-libc/libchcore/cmake/do_override_dir.sh +++ b/Lab5/user/chcore-libc/libchcore/cmake/do_override_dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab5/user/chcore-libc/libchcore/cmake/do_patch_dir.sh b/Lab5/user/chcore-libc/libchcore/cmake/do_patch_dir.sh index ac6d7c92..29202449 100644 --- a/Lab5/user/chcore-libc/libchcore/cmake/do_patch_dir.sh +++ b/Lab5/user/chcore-libc/libchcore/cmake/do_patch_dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab5/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh b/Lab5/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh index 6640077c..2477f5f5 100755 --- a/Lab5/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh +++ b/Lab5/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab5/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh b/Lab5/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh index 8b2dc13b..6fa3d103 100644 --- a/Lab5/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh +++ b/Lab5/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab5/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh b/Lab5/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh index 416bfb31..826e7b9f 100644 --- a/Lab5/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh +++ b/Lab5/user/chcore-libc/libchcore/porting/patches/include/pthread.h.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab5/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh b/Lab5/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh index b45a9055..9a7af38b 100644 --- a/Lab5/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh +++ b/Lab5/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/kernel-rpi3/tests/unit/arch/aarch64/runtest.sh b/Lab6/kernel-rpi3/tests/unit/arch/aarch64/runtest.sh index 93bf07e5..3e204439 100644 --- a/Lab6/kernel-rpi3/tests/unit/arch/aarch64/runtest.sh +++ b/Lab6/kernel-rpi3/tests/unit/arch/aarch64/runtest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/kernel-rpi3/tests/unit/arch/riscv64/runtest.sh b/Lab6/kernel-rpi3/tests/unit/arch/riscv64/runtest.sh index 341b4eef..8de35d33 100644 --- a/Lab6/kernel-rpi3/tests/unit/arch/riscv64/runtest.sh +++ b/Lab6/kernel-rpi3/tests/unit/arch/riscv64/runtest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/kernel-rpi3/tests/unit/arch/x86_64/runtest.sh b/Lab6/kernel-rpi3/tests/unit/arch/x86_64/runtest.sh index 341b4eef..8de35d33 100644 --- a/Lab6/kernel-rpi3/tests/unit/arch/x86_64/runtest.sh +++ b/Lab6/kernel-rpi3/tests/unit/arch/x86_64/runtest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/kernel-rpi4/tests/unit/arch/aarch64/runtest.sh b/Lab6/kernel-rpi4/tests/unit/arch/aarch64/runtest.sh index 93bf07e5..3e204439 100644 --- a/Lab6/kernel-rpi4/tests/unit/arch/aarch64/runtest.sh +++ b/Lab6/kernel-rpi4/tests/unit/arch/aarch64/runtest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/kernel-rpi4/tests/unit/arch/riscv64/runtest.sh b/Lab6/kernel-rpi4/tests/unit/arch/riscv64/runtest.sh index 341b4eef..8de35d33 100644 --- a/Lab6/kernel-rpi4/tests/unit/arch/riscv64/runtest.sh +++ b/Lab6/kernel-rpi4/tests/unit/arch/riscv64/runtest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/kernel-rpi4/tests/unit/arch/x86_64/runtest.sh b/Lab6/kernel-rpi4/tests/unit/arch/x86_64/runtest.sh index 341b4eef..8de35d33 100644 --- a/Lab6/kernel-rpi4/tests/unit/arch/x86_64/runtest.sh +++ b/Lab6/kernel-rpi4/tests/unit/arch/x86_64/runtest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/scripts/build/buildup_cpp.sh b/Lab6/scripts/build/buildup_cpp.sh index 72c30064..0abc08c8 100755 --- a/Lab6/scripts/build/buildup_cpp.sh +++ b/Lab6/scripts/build/buildup_cpp.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/scripts/build/cmake/Helpers/input.sh b/Lab6/scripts/build/cmake/Helpers/input.sh index ba1f0162..078b2689 100644 --- a/Lab6/scripts/build/cmake/Helpers/input.sh +++ b/Lab6/scripts/build/cmake/Helpers/input.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/scripts/build/demos.sh b/Lab6/scripts/build/demos.sh index 4dd528ea..f0ca4830 100644 --- a/Lab6/scripts/build/demos.sh +++ b/Lab6/scripts/build/demos.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/scripts/grade/lab5.sh b/Lab6/scripts/grade/lab5.sh index fdbd2b78..18a7d857 100755 --- a/Lab6/scripts/grade/lab5.sh +++ b/Lab6/scripts/grade/lab5.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash make="${MAKE:-make}" diff --git a/Lab6/scripts/qemu/emulate.tpl.sh b/Lab6/scripts/qemu/emulate.tpl.sh index 2292de5d..8582f925 100644 --- a/Lab6/scripts/qemu/emulate.tpl.sh +++ b/Lab6/scripts/qemu/emulate.tpl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/scripts/qemu/qemu_wrapper.sh b/Lab6/scripts/qemu/qemu_wrapper.sh index 2d11faaf..29cbc982 100755 --- a/Lab6/scripts/qemu/qemu_wrapper.sh +++ b/Lab6/scripts/qemu/qemu_wrapper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/user/chcore-libc/libchcore/cmake/do_override_dir.sh b/Lab6/user/chcore-libc/libchcore/cmake/do_override_dir.sh index 1d3456fd..fdf1a554 100644 --- a/Lab6/user/chcore-libc/libchcore/cmake/do_override_dir.sh +++ b/Lab6/user/chcore-libc/libchcore/cmake/do_override_dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/user/chcore-libc/libchcore/cmake/do_patch_dir.sh b/Lab6/user/chcore-libc/libchcore/cmake/do_patch_dir.sh index ac6d7c92..29202449 100755 --- a/Lab6/user/chcore-libc/libchcore/cmake/do_patch_dir.sh +++ b/Lab6/user/chcore-libc/libchcore/cmake/do_patch_dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh b/Lab6/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh index 6640077c..2477f5f5 100755 --- a/Lab6/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh +++ b/Lab6/user/chcore-libc/libchcore/porting/overrides/arch/remove_bak.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh b/Lab6/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh index 8b2dc13b..6fa3d103 100644 --- a/Lab6/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh +++ b/Lab6/user/chcore-libc/libchcore/porting/patches/include/alltypes.h.in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh b/Lab6/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh index b45a9055..9a7af38b 100644 --- a/Lab6/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh +++ b/Lab6/user/chcore-libc/libchcore/porting/patches/src/internal/pthread_impl.h.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Lab6/user/chcore-libs/graphic/lvgl/lvgl/env_support/cmsis-pack/gen_pack.sh b/Lab6/user/chcore-libs/graphic/lvgl/lvgl/env_support/cmsis-pack/gen_pack.sh index ff17b5e5..3232669d 100644 --- a/Lab6/user/chcore-libs/graphic/lvgl/lvgl/env_support/cmsis-pack/gen_pack.sh +++ b/Lab6/user/chcore-libs/graphic/lvgl/lvgl/env_support/cmsis-pack/gen_pack.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Version: 1.1 # Date: 2022-01-11 # This bash script generates a CMSIS Software Pack: diff --git a/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/build_html_examples.sh b/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/build_html_examples.sh index ae8b6317..92d3a866 100644 --- a/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/build_html_examples.sh +++ b/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/build_html_examples.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" CURRENT_REF="$(git rev-parse HEAD)" diff --git a/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/find_version.sh b/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/find_version.sh index c58bbc41..48ebe3b1 100644 --- a/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/find_version.sh +++ b/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/find_version.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Credit: https://stackoverflow.com/a/4774063 SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" TMPENVFILE=$(mktemp /tmp/lvgl.script.XXXXXX) diff --git a/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/genexamplelist.sh b/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/genexamplelist.sh index 6547c002..450ec780 100644 --- a/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/genexamplelist.sh +++ b/Lab6/user/chcore-libs/graphic/lvgl/lvgl/scripts/genexamplelist.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash echo "/* Autogenerated */" echo '#include ' echo '#include "examplelist.h"' diff --git a/Scripts/build/cmake/Helpers/input.sh b/Scripts/build/cmake/Helpers/input.sh index ba1f0162..078b2689 100644 --- a/Scripts/build/cmake/Helpers/input.sh +++ b/Scripts/build/cmake/Helpers/input.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Scripts/extras/lab5/grader.sh b/Scripts/extras/lab5/grader.sh index 21ac0e0c..4f3cc198 100755 --- a/Scripts/extras/lab5/grader.sh +++ b/Scripts/extras/lab5/grader.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash CMAKE_EXTRA_DIR="${LABROOT}/Scripts/extras/lab5/cmake" SYSTEM_SERVER_DIR="${LABDIR}/user/system-services/system-servers" diff --git a/Scripts/gendeps.sh b/Scripts/gendeps.sh index d1d226ec..931bb150 100755 --- a/Scripts/gendeps.sh +++ b/Scripts/gendeps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/shellenv.sh diff --git a/Scripts/grader.sh b/Scripts/grader.sh index c76dcd86..90aa7266 100755 --- a/Scripts/grader.sh +++ b/Scripts/grader.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test -f ${LABDIR}/.config && cp ${LABDIR}/.config ${LABDIR}/.config.bak diff --git a/Scripts/qemu_wrapper.sh b/Scripts/qemu_wrapper.sh index 2d11faaf..29cbc982 100755 --- a/Scripts/qemu_wrapper.sh +++ b/Scripts/qemu_wrapper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) # Licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. diff --git a/Scripts/shellenv.sh b/Scripts/shellenv.sh index 9512b445..bd3327f6 100755 --- a/Scripts/shellenv.sh +++ b/Scripts/shellenv.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash DIST=$(cat /etc/os-release | grep -E "^ID=(.*)$" | cut -d "=" -f 2)