summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/BuildInstructions.md38
-rwxr-xr-xMeta/check-ak-test-files.sh2
-rwxr-xr-xMeta/check-debug-flags.sh2
-rwxr-xr-xMeta/check-style.sh2
-rwxr-xr-xMeta/generate-embedded-resource-assembly.sh2
-rwxr-xr-xMeta/lint-ci.sh2
-rwxr-xr-xMeta/lint-clang-format.sh2
-rwxr-xr-xMeta/lint-executable-resources.sh2
-rwxr-xr-xMeta/lint-ipc-ids.sh2
-rwxr-xr-xMeta/lint-missing-resources.sh2
-rwxr-xr-xMeta/lint-prettier.sh2
-rwxr-xr-xMeta/lint-python.sh2
-rwxr-xr-xMeta/lint-shell-scripts.sh2
-rwxr-xr-xPorts/.port_include.sh2
-rwxr-xr-xPorts/SDL2/package.sh2
-rwxr-xr-xPorts/bash/package.sh2
-rwxr-xr-xPorts/bc/package.sh2
-rwxr-xr-xPorts/binutils/package.sh2
-rwxr-xr-xPorts/build_all.sh2
-rwxr-xr-xPorts/byacc/package.sh2
-rwxr-xr-xPorts/c-ray/package.sh2
-rwxr-xr-xPorts/curl/package.sh2
-rwxr-xr-xPorts/dash/package.sh2
-rwxr-xr-xPorts/diffutils/package.sh2
-rwxr-xr-xPorts/doom/package.sh2
-rwxr-xr-xPorts/dropbear/package.sh2
-rwxr-xr-xPorts/ed/package.sh2
-rwxr-xr-xPorts/editline/package.sh2
-rwxr-xr-xPorts/figlet/package.sh2
-rwxr-xr-xPorts/flex/package.sh2
-rwxr-xr-xPorts/frotz/package.sh2
-rwxr-xr-xPorts/gcc/package.sh2
-rwxr-xr-xPorts/git/package.sh2
-rwxr-xr-xPorts/gnuplot/package.sh2
-rwxr-xr-xPorts/grep/package.sh2
-rwxr-xr-xPorts/indent/package.sh2
-rwxr-xr-xPorts/jot/package.sh2
-rwxr-xr-xPorts/jq/package.sh2
-rwxr-xr-xPorts/klong/package.sh2
-rwxr-xr-xPorts/less/package.sh2
-rwxr-xr-xPorts/libarchive/package.sh2
-rwxr-xr-xPorts/libexpat/package.sh2
-rwxr-xr-xPorts/libffi/package.sh2
-rwxr-xr-xPorts/libiconv/package.sh2
-rwxr-xr-xPorts/libpuffy/package.sh2
-rwxr-xr-xPorts/links/package.sh2
-rwxr-xr-xPorts/lua/package.sh2
-rwxr-xr-xPorts/m4/package.sh2
-rwxr-xr-xPorts/make/package.sh2
-rwxr-xr-xPorts/mandoc/package.sh2
-rwxr-xr-xPorts/mawk/package.sh2
-rwxr-xr-xPorts/mbedtls/package.sh2
-rwxr-xr-xPorts/mrsh/package.sh2
-rwxr-xr-xPorts/nano/package.sh2
-rwxr-xr-xPorts/nasm/package.sh2
-rwxr-xr-xPorts/ncurses/package.sh2
-rwxr-xr-xPorts/neofetch/package.sh2
-rw-r--r--Ports/neofetch/patches/fix-shebang.patch2
-rwxr-xr-xPorts/nesalizer/package.sh2
-rwxr-xr-xPorts/ninja/package.sh2
-rwxr-xr-xPorts/nyancat/package.sh2
-rwxr-xr-xPorts/openssh/package.sh2
-rwxr-xr-xPorts/openssl/package.sh2
-rwxr-xr-xPorts/patch/package.sh2
-rwxr-xr-xPorts/pcre2/package.sh2
-rwxr-xr-xPorts/pkgconf/package.sh2
-rwxr-xr-xPorts/printf/package.sh2
-rwxr-xr-xPorts/quake/package.sh2
-rwxr-xr-xPorts/rsync/package.sh2
-rwxr-xr-xPorts/sed/package.sh2
-rwxr-xr-xPorts/sl/package.sh2
-rwxr-xr-xPorts/stress-ng/package.sh2
-rwxr-xr-xPorts/termcap/package.sh2
-rwxr-xr-xPorts/tinycc/package.sh2
-rwxr-xr-xPorts/tr/package.sh2
-rwxr-xr-xPorts/vim/package.sh2
-rwxr-xr-xPorts/vttest/package.sh2
-rwxr-xr-xPorts/zlib/package.sh2
-rwxr-xr-xPorts/zstd/package.sh2
-rwxr-xr-xToolchain/BuildPython.sh1
-rwxr-xr-xToolchain/BuildQemu.sh2
-rw-r--r--Userland/Libraries/LibWeb/CMakeLists.txt4
82 files changed, 119 insertions, 82 deletions
diff --git a/Documentation/BuildInstructions.md b/Documentation/BuildInstructions.md
index 818ffc3f78..e1ce1224e6 100644
--- a/Documentation/BuildInstructions.md
+++ b/Documentation/BuildInstructions.md
@@ -57,6 +57,44 @@ sudo apt update
Ensure your CMake version is >= 3.16 with `cmake --version`. If your system doesn't provide a suitable version of CMake, you can download a binary release from the [CMake website](https://cmake.org/download).
+**NixOS**
+
+You can use a `nix-shell` script like the following to set up the correct environment:
+
+myshell.nix:
+```
+with import <nixpkgs> {};
+
+stdenv.mkDerivation {
+ name = "cpp-env";
+ nativeBuildInputs = [
+ gcc10
+ curl
+ cmake
+ mpfr
+ ninja
+ gmp
+ libmpc
+ e2fsprogs
+ patch
+
+ # Example Build-time Additional Dependencies
+ pkgconfig
+ ];
+ buildInputs = [
+ # Example Run-time Additional Dependencies
+ openssl
+ x11
+ # glibc
+ ];
+ hardeningDisable = [ "format" "fortify" ];
+}
+```
+
+Then use this script: `nix-shell myshell.nix`.
+
+Once you're in nix-shell, you should be able to follow the build directions.
+
#### macOS prerequisites
Make sure you have all the dependencies installed:
```bash
diff --git a/Meta/check-ak-test-files.sh b/Meta/check-ak-test-files.sh
index 3a657a76bb..b9fab96559 100755
--- a/Meta/check-ak-test-files.sh
+++ b/Meta/check-ak-test-files.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eo pipefail
diff --git a/Meta/check-debug-flags.sh b/Meta/check-debug-flags.sh
index 6fb4daeb47..862b417604 100755
--- a/Meta/check-debug-flags.sh
+++ b/Meta/check-debug-flags.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eo pipefail
diff --git a/Meta/check-style.sh b/Meta/check-style.sh
index 4bbe5ca680..b0d1310aeb 100755
--- a/Meta/check-style.sh
+++ b/Meta/check-style.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.." || exit 1
diff --git a/Meta/generate-embedded-resource-assembly.sh b/Meta/generate-embedded-resource-assembly.sh
index b9d64648cf..bb1d619753 100755
--- a/Meta/generate-embedded-resource-assembly.sh
+++ b/Meta/generate-embedded-resource-assembly.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/Meta/lint-ci.sh b/Meta/lint-ci.sh
index 69d96e406a..2467757df3 100755
--- a/Meta/lint-ci.sh
+++ b/Meta/lint-ci.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/Meta/lint-clang-format.sh b/Meta/lint-clang-format.sh
index 0d961252f8..1ab694d81c 100755
--- a/Meta/lint-clang-format.sh
+++ b/Meta/lint-clang-format.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/Meta/lint-executable-resources.sh b/Meta/lint-executable-resources.sh
index 669bbd3487..ac63461dc5 100755
--- a/Meta/lint-executable-resources.sh
+++ b/Meta/lint-executable-resources.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eo pipefail
diff --git a/Meta/lint-ipc-ids.sh b/Meta/lint-ipc-ids.sh
index 9973b6efff..4a7004444d 100755
--- a/Meta/lint-ipc-ids.sh
+++ b/Meta/lint-ipc-ids.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eo pipefail
diff --git a/Meta/lint-missing-resources.sh b/Meta/lint-missing-resources.sh
index bac8e6b8ac..1a1b6f6a63 100755
--- a/Meta/lint-missing-resources.sh
+++ b/Meta/lint-missing-resources.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eo pipefail
diff --git a/Meta/lint-prettier.sh b/Meta/lint-prettier.sh
index 5867ca3078..7a6701e8ee 100755
--- a/Meta/lint-prettier.sh
+++ b/Meta/lint-prettier.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/Meta/lint-python.sh b/Meta/lint-python.sh
index 494c2a7bc2..40eb812653 100755
--- a/Meta/lint-python.sh
+++ b/Meta/lint-python.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/Meta/lint-shell-scripts.sh b/Meta/lint-shell-scripts.sh
index da37d35d6d..aba9b06b2e 100755
--- a/Meta/lint-shell-scripts.sh
+++ b/Meta/lint-shell-scripts.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eo pipefail
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh
index 55158e3275..cd738c3b3b 100755
--- a/Ports/.port_include.sh
+++ b/Ports/.port_include.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eu
SCRIPT=`dirname $0`
diff --git a/Ports/SDL2/package.sh b/Ports/SDL2/package.sh
index d7e803ba8d..84a851f9b7 100755
--- a/Ports/SDL2/package.sh
+++ b/Ports/SDL2/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=SDL2
version=serenity-git
workdir=SDL-master-serenity
diff --git a/Ports/bash/package.sh b/Ports/bash/package.sh
index 1870aec275..8d9a246a68 100755
--- a/Ports/bash/package.sh
+++ b/Ports/bash/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=bash
version=5.0
useconfigure=true
diff --git a/Ports/bc/package.sh b/Ports/bc/package.sh
index f467b0b3ba..a446b1fd55 100755
--- a/Ports/bc/package.sh
+++ b/Ports/bc/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=bc
version=2.5.1
files="https://github.com/gavinhoward/bc/releases/download/${version}/bc-${version}.tar.xz bc-${version}.tar.xz
diff --git a/Ports/binutils/package.sh b/Ports/binutils/package.sh
index 39dda685e5..e75808a5d9 100755
--- a/Ports/binutils/package.sh
+++ b/Ports/binutils/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=binutils
version=2.32
useconfigure=true
diff --git a/Ports/build_all.sh b/Ports/build_all.sh
index ea40a41ba0..e7f307db94 100755
--- a/Ports/build_all.sh
+++ b/Ports/build_all.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
clean=false
case "$1" in
diff --git a/Ports/byacc/package.sh b/Ports/byacc/package.sh
index 859f0de561..0a98aaa13a 100755
--- a/Ports/byacc/package.sh
+++ b/Ports/byacc/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=byacc
version=20191125
files="https://invisible-mirror.net/archives/byacc/byacc-${version}.tgz byacc-${version}.tgz
diff --git a/Ports/c-ray/package.sh b/Ports/c-ray/package.sh
index a1db8e6cdc..6f1352484e 100755
--- a/Ports/c-ray/package.sh
+++ b/Ports/c-ray/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=c-ray
version=git
workdir=c-ray-master
diff --git a/Ports/curl/package.sh b/Ports/curl/package.sh
index 125987d50e..a9b34564cf 100755
--- a/Ports/curl/package.sh
+++ b/Ports/curl/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=curl
version=7.65.3
useconfigure=true
diff --git a/Ports/dash/package.sh b/Ports/dash/package.sh
index 6b1c934226..4d2ea2722e 100755
--- a/Ports/dash/package.sh
+++ b/Ports/dash/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=dash
version=0.5.10.2
useconfigure=true
diff --git a/Ports/diffutils/package.sh b/Ports/diffutils/package.sh
index fb3c3a96ed..a5aff4836d 100755
--- a/Ports/diffutils/package.sh
+++ b/Ports/diffutils/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=diffutils
version=3.5
files="https://ftp.gnu.org/gnu/diffutils/diffutils-${version}.tar.xz diffutils-${version}.tar.xz
diff --git a/Ports/doom/package.sh b/Ports/doom/package.sh
index 49c982ea12..8238bba0c4 100755
--- a/Ports/doom/package.sh
+++ b/Ports/doom/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=doom
workdir=SerenityDOOM-master
version=serenity-git
diff --git a/Ports/dropbear/package.sh b/Ports/dropbear/package.sh
index 498404bd87..2088732467 100755
--- a/Ports/dropbear/package.sh
+++ b/Ports/dropbear/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=dropbear
version=2019.78
files="https://mirror.dropbear.nl/mirror/releases/dropbear-${version}.tar.bz2 dropbear-${version}.tar.bz2
diff --git a/Ports/ed/package.sh b/Ports/ed/package.sh
index 8832756232..2eab3d8d05 100755
--- a/Ports/ed/package.sh
+++ b/Ports/ed/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=ed
version=1.15
files="https://ftp.gnu.org/gnu/ed/ed-1.15.tar.lz ed-1.15.tar.lz"
diff --git a/Ports/editline/package.sh b/Ports/editline/package.sh
index 1b1d092ca0..8c3f443a45 100755
--- a/Ports/editline/package.sh
+++ b/Ports/editline/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=editline
version=1.17.1
useconfigure=true
diff --git a/Ports/figlet/package.sh b/Ports/figlet/package.sh
index 8b40ef9319..dfad280c88 100755
--- a/Ports/figlet/package.sh
+++ b/Ports/figlet/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=figlet
version=2.2.5
files="http://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gz figlet-2.2.5.tar.gz d88cb33a14f1469fff975d021ae2858e"
diff --git a/Ports/flex/package.sh b/Ports/flex/package.sh
index 34f28bd084..42be0f59dc 100755
--- a/Ports/flex/package.sh
+++ b/Ports/flex/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=flex
version=2.6.4
files="https://github.com/westes/flex/releases/download/v${version}/flex-${version}.tar.gz flex-${version}.tar.gz
diff --git a/Ports/frotz/package.sh b/Ports/frotz/package.sh
index 16b55b737c..250bbc66a4 100755
--- a/Ports/frotz/package.sh
+++ b/Ports/frotz/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=frotz
version=git
workdir=frotz-master
diff --git a/Ports/gcc/package.sh b/Ports/gcc/package.sh
index 828bfcb07a..d54c256624 100755
--- a/Ports/gcc/package.sh
+++ b/Ports/gcc/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=gcc
version=10.2.0
useconfigure=true
diff --git a/Ports/git/package.sh b/Ports/git/package.sh
index 82bcc68b1b..db308d0b98 100755
--- a/Ports/git/package.sh
+++ b/Ports/git/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=git
version=2.26.0
useconfigure="true"
diff --git a/Ports/gnuplot/package.sh b/Ports/gnuplot/package.sh
index 706498a40c..93e519d387 100755
--- a/Ports/gnuplot/package.sh
+++ b/Ports/gnuplot/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=gnuplot
version=5.2.8
useconfigure=true
diff --git a/Ports/grep/package.sh b/Ports/grep/package.sh
index 62f2923c62..8801f38d72 100755
--- a/Ports/grep/package.sh
+++ b/Ports/grep/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=grep
version=2.5.4
files="https://ftp.gnu.org/gnu/grep/grep-${version}.tar.gz grep-${version}.tar.gz
diff --git a/Ports/indent/package.sh b/Ports/indent/package.sh
index de36320b18..5b54edf2c0 100755
--- a/Ports/indent/package.sh
+++ b/Ports/indent/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=indent
version=2.2.11
files="https://ftp.gnu.org/gnu/indent/indent-${version}.tar.gz indent-${version}.tar.gz
diff --git a/Ports/jot/package.sh b/Ports/jot/package.sh
index d875157415..4f13337f40 100755
--- a/Ports/jot/package.sh
+++ b/Ports/jot/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=jot
version=6.6
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-1.0/jot-${version}.tar.gz jot-${version}.tar.gz"
diff --git a/Ports/jq/package.sh b/Ports/jq/package.sh
index 795e71a8db..f7a8b95015 100755
--- a/Ports/jq/package.sh
+++ b/Ports/jq/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=jq
version=1.6
useconfigure=true
diff --git a/Ports/klong/package.sh b/Ports/klong/package.sh
index 57ad72d7c8..6204969ce0 100755
--- a/Ports/klong/package.sh
+++ b/Ports/klong/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=klong
version=20190926
files="http://t3x.org/klong/klong20190926.tgz klong20190926.tgz"
diff --git a/Ports/less/package.sh b/Ports/less/package.sh
index 518571d9c1..f74579f3ad 100755
--- a/Ports/less/package.sh
+++ b/Ports/less/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=less
version=530
useconfigure="true"
diff --git a/Ports/libarchive/package.sh b/Ports/libarchive/package.sh
index 8773f44cd2..17e3c4303d 100755
--- a/Ports/libarchive/package.sh
+++ b/Ports/libarchive/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=libarchive
version=3.4.0
useconfigure=true
diff --git a/Ports/libexpat/package.sh b/Ports/libexpat/package.sh
index bb020bc638..72c78495eb 100755
--- a/Ports/libexpat/package.sh
+++ b/Ports/libexpat/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=libexpat
version=2.2.9
useconfigure=true
diff --git a/Ports/libffi/package.sh b/Ports/libffi/package.sh
index a690be46e7..81a671a2d8 100755
--- a/Ports/libffi/package.sh
+++ b/Ports/libffi/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=libffi
version=3.3
useconfigure=true
diff --git a/Ports/libiconv/package.sh b/Ports/libiconv/package.sh
index 1662df9c30..1944753b9e 100755
--- a/Ports/libiconv/package.sh
+++ b/Ports/libiconv/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=libiconv
version=1.16
useconfigure=true
diff --git a/Ports/libpuffy/package.sh b/Ports/libpuffy/package.sh
index 6380d27a65..d9310d07a2 100755
--- a/Ports/libpuffy/package.sh
+++ b/Ports/libpuffy/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=libpuffy
version=1.0
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-${version}/libpuffy-${version}.tar.gz libpuffy-${version}.tar.gz"
diff --git a/Ports/links/package.sh b/Ports/links/package.sh
index b841230ff9..e67e29c1d2 100755
--- a/Ports/links/package.sh
+++ b/Ports/links/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=links
version=2.19
useconfigure=true
diff --git a/Ports/lua/package.sh b/Ports/lua/package.sh
index 1df7d0abc8..2832f09985 100755
--- a/Ports/lua/package.sh
+++ b/Ports/lua/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=lua
version=5.3.5
files="http://www.lua.org/ftp/lua-5.3.5.tar.gz lua-5.3.5.tar.gz 4f4b4f323fd3514a68e0ab3da8ce3455"
diff --git a/Ports/m4/package.sh b/Ports/m4/package.sh
index 12c0fc5168..259fe47bdd 100755
--- a/Ports/m4/package.sh
+++ b/Ports/m4/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=m4
version=1.4.9
useconfigure=true
diff --git a/Ports/make/package.sh b/Ports/make/package.sh
index 3e930b2ddb..2c21e38306 100755
--- a/Ports/make/package.sh
+++ b/Ports/make/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=make
version=4.3
useconfigure=true
diff --git a/Ports/mandoc/package.sh b/Ports/mandoc/package.sh
index bdf4edb045..de055d3561 100755
--- a/Ports/mandoc/package.sh
+++ b/Ports/mandoc/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=mandoc
version=1.14.5
useconfigure=true
diff --git a/Ports/mawk/package.sh b/Ports/mawk/package.sh
index 174187b620..8f4085e366 100755
--- a/Ports/mawk/package.sh
+++ b/Ports/mawk/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=mawk
version=1.3.4-20200120
files="https://invisible-mirror.net/archives/mawk/mawk-${version}.tgz mawk-${version}.tgz
diff --git a/Ports/mbedtls/package.sh b/Ports/mbedtls/package.sh
index 91726f0870..f632872abb 100755
--- a/Ports/mbedtls/package.sh
+++ b/Ports/mbedtls/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=mbedtls
version=2.16.2
files="https://tls.mbed.org/download/mbedtls-${version}-apache.tgz mbedtls-${version}-apache.tgz ba809acfd4b41b86895b92e98d936695b5b62b73"
diff --git a/Ports/mrsh/package.sh b/Ports/mrsh/package.sh
index 3627d99d4e..d23dc5abae 100755
--- a/Ports/mrsh/package.sh
+++ b/Ports/mrsh/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=mrsh
version=d9763a32e7da572677d1681bb1fc67f117d641f3
files="https://codeload.github.com/emersion/mrsh/legacy.tar.gz/d9763a32e7da572677d1681bb1fc67f117d641f3 emersion-mrsh-d9763a3.tar.gz"
diff --git a/Ports/nano/package.sh b/Ports/nano/package.sh
index fda7b0ed09..78437e4262 100755
--- a/Ports/nano/package.sh
+++ b/Ports/nano/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=nano
version=4.5
useconfigure="true"
diff --git a/Ports/nasm/package.sh b/Ports/nasm/package.sh
index da8bee5dec..cab5e87823 100755
--- a/Ports/nasm/package.sh
+++ b/Ports/nasm/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=nasm
version=2.14.02
files="https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.gz nasm-2.14.02.tar.gz"
diff --git a/Ports/ncurses/package.sh b/Ports/ncurses/package.sh
index 6717d4deb3..77f04466db 100755
--- a/Ports/ncurses/package.sh
+++ b/Ports/ncurses/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=ncurses
version=6.2
useconfigure=true
diff --git a/Ports/neofetch/package.sh b/Ports/neofetch/package.sh
index 1130f87295..6666289616 100755
--- a/Ports/neofetch/package.sh
+++ b/Ports/neofetch/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=neofetch
version=7.0.0
useconfigure=false
diff --git a/Ports/neofetch/patches/fix-shebang.patch b/Ports/neofetch/patches/fix-shebang.patch
index 9fe36cd60a..ab8efd0494 100644
--- a/Ports/neofetch/patches/fix-shebang.patch
+++ b/Ports/neofetch/patches/fix-shebang.patch
@@ -2,7 +2,7 @@
+++ neofetch-7.0.0/neofetch 2020-04-27 18:57:54.263417418 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
-+#!/bin/bash
++#!/usr/bin/env bash
# vim: noai:ts=4:sw=4:expandtab
# shellcheck source=/dev/null
# shellcheck disable=2009
diff --git a/Ports/nesalizer/package.sh b/Ports/nesalizer/package.sh
index c0a30095e6..e29b3d424f 100755
--- a/Ports/nesalizer/package.sh
+++ b/Ports/nesalizer/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=nesalizer
version=master
makeopts="CONF=release"
diff --git a/Ports/ninja/package.sh b/Ports/ninja/package.sh
index 977a95aa6e..0a5b12c0c8 100755
--- a/Ports/ninja/package.sh
+++ b/Ports/ninja/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=ninja
version=1.8.2
workdir=ninja-1.8.2
diff --git a/Ports/nyancat/package.sh b/Ports/nyancat/package.sh
index 7478416931..f7506534f8 100755
--- a/Ports/nyancat/package.sh
+++ b/Ports/nyancat/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=nyancat
version=git
workdir=nyancat-master
diff --git a/Ports/openssh/package.sh b/Ports/openssh/package.sh
index bdec48ad7e..d6f3f4574e 100755
--- a/Ports/openssh/package.sh
+++ b/Ports/openssh/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=openssh
workdir=openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676
version=8.3-9ca7e9c
diff --git a/Ports/openssl/package.sh b/Ports/openssl/package.sh
index 634af782f9..c0d76d945e 100755
--- a/Ports/openssl/package.sh
+++ b/Ports/openssl/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=openssl
branch='1.0.2'
version="${branch}t"
diff --git a/Ports/patch/package.sh b/Ports/patch/package.sh
index 6bac7d18b3..cb48d1edce 100755
--- a/Ports/patch/package.sh
+++ b/Ports/patch/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=patch
version=6.6
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-1.0/patch-${version}.tar.gz patch-${version}.tar.gz"
diff --git a/Ports/pcre2/package.sh b/Ports/pcre2/package.sh
index 9fe2a35234..c390352c24 100755
--- a/Ports/pcre2/package.sh
+++ b/Ports/pcre2/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=pcre2
version=10.34
useconfigure=true
diff --git a/Ports/pkgconf/package.sh b/Ports/pkgconf/package.sh
index b1373763ab..d1a6d0be80 100755
--- a/Ports/pkgconf/package.sh
+++ b/Ports/pkgconf/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=pkgconf
version=1.7.3
files="https://distfiles.dereferenced.org/pkgconf/pkgconf-1.7.3.tar.xz pkgconf-1.7.3.tar.xz"
diff --git a/Ports/printf/package.sh b/Ports/printf/package.sh
index a4e5ab69c6..7d6da383a7 100755
--- a/Ports/printf/package.sh
+++ b/Ports/printf/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=printf
version=6.6
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-1.0/printf-${version}.tar.gz printf-${version}.tar.gz"
diff --git a/Ports/quake/package.sh b/Ports/quake/package.sh
index cab4ff4aae..bd0c43ad89 100755
--- a/Ports/quake/package.sh
+++ b/Ports/quake/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=quake
version=0.65
workdir=SerenityQuake-master
diff --git a/Ports/rsync/package.sh b/Ports/rsync/package.sh
index 701ee831cc..942de7f775 100755
--- a/Ports/rsync/package.sh
+++ b/Ports/rsync/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=rsync
version=3.1.3
useconfigure="true"
diff --git a/Ports/sed/package.sh b/Ports/sed/package.sh
index 3b934cd531..4a91f42520 100755
--- a/Ports/sed/package.sh
+++ b/Ports/sed/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=sed
version=4.2.1
useconfigure="true"
diff --git a/Ports/sl/package.sh b/Ports/sl/package.sh
index 6aae887352..6b55fe8c20 100755
--- a/Ports/sl/package.sh
+++ b/Ports/sl/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=sl
version=git
workdir=sl-master
diff --git a/Ports/stress-ng/package.sh b/Ports/stress-ng/package.sh
index 422ea27e40..887ad87559 100755
--- a/Ports/stress-ng/package.sh
+++ b/Ports/stress-ng/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=stress-ng
version=0.11.23
workdir=stress-ng-${version}
diff --git a/Ports/termcap/package.sh b/Ports/termcap/package.sh
index be5657b288..b54eae7667 100755
--- a/Ports/termcap/package.sh
+++ b/Ports/termcap/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=termcap
version=1.3.1
useconfigure=true
diff --git a/Ports/tinycc/package.sh b/Ports/tinycc/package.sh
index 5d1ef76cc8..5956d2027e 100755
--- a/Ports/tinycc/package.sh
+++ b/Ports/tinycc/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=tinycc
workdir=tinycc-dev
version=dev
diff --git a/Ports/tr/package.sh b/Ports/tr/package.sh
index e8e51c315f..e77f8af36f 100755
--- a/Ports/tr/package.sh
+++ b/Ports/tr/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=tr
version=6.7
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-1.0/tr-${version}.tar.gz tr-${version}.tar.gz"
diff --git a/Ports/vim/package.sh b/Ports/vim/package.sh
index 911899e613..2e0103d76c 100755
--- a/Ports/vim/package.sh
+++ b/Ports/vim/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=vim
version=git
workdir=vim-master
diff --git a/Ports/vttest/package.sh b/Ports/vttest/package.sh
index d412bc2c56..00cc322416 100755
--- a/Ports/vttest/package.sh
+++ b/Ports/vttest/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=vttest
version=20200610
useconfigure=true
diff --git a/Ports/zlib/package.sh b/Ports/zlib/package.sh
index 0c1d1c8a96..d1fa5292f1 100755
--- a/Ports/zlib/package.sh
+++ b/Ports/zlib/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=zlib
version=1.2.11
useconfigure=true
diff --git a/Ports/zstd/package.sh b/Ports/zstd/package.sh
index 576899b085..356ee0239b 100755
--- a/Ports/zstd/package.sh
+++ b/Ports/zstd/package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash ../.port_include.sh
+#!/usr/bin/env -S bash ../.port_include.sh
port=zstd
version=1.4.4
files="https://github.com/facebook/zstd/releases/download/v${version}/zstd-${version}.tar.gz zstd-${version}.tar.gz
diff --git a/Toolchain/BuildPython.sh b/Toolchain/BuildPython.sh
index b8a2029a84..4453e4a389 100755
--- a/Toolchain/BuildPython.sh
+++ b/Toolchain/BuildPython.sh
@@ -1,5 +1,4 @@
#!/usr/bin/env bash
-
set -e
# This file will need to be run in bash, for now.
diff --git a/Toolchain/BuildQemu.sh b/Toolchain/BuildQemu.sh
index 42fa251068..c18aa92493 100755
--- a/Toolchain/BuildQemu.sh
+++ b/Toolchain/BuildQemu.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
# This file will need to be run in bash, for now.
diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt
index 1878872423..83f7cbf573 100644
--- a/Userland/Libraries/LibWeb/CMakeLists.txt
+++ b/Userland/Libraries/LibWeb/CMakeLists.txt
@@ -390,7 +390,7 @@ add_custom_target(generate_PropertyID.h DEPENDS CSS/PropertyID.h)
add_custom_command(
OUTPUT CSS/PropertyID.cpp
- COMMAND /bin/mkdir -p CSS
+ COMMAND /usr/bin/env -S mkdir -p CSS
COMMAND ${write_if_different} CSS/PropertyID.cpp CodeGenerators/Generate_CSS_PropertyID_cpp ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Properties.json
VERBATIM
DEPENDS Generate_CSS_PropertyID_cpp
@@ -408,7 +408,7 @@ add_custom_target(generate_ValueID.h DEPENDS CSS/ValueID.h)
add_custom_command(
OUTPUT CSS/ValueID.cpp
- COMMAND /bin/mkdir -p CSS
+ COMMAND /usr/bin/env -S mkdir -p CSS
COMMAND ${write_if_different} CSS/ValueID.cpp CodeGenerators/Generate_CSS_ValueID_cpp ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Identifiers.json
VERBATIM
DEPENDS Generate_CSS_ValueID_cpp