Switch to using #!/usr/bin/env bash

This fixes http.sh on nixos, macos and probably a few other systems
merge-requests/2/head
bad 2021-09-22 14:52:03 +02:00
parent f0ccf5d8ef
commit 52c09d888e
11 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
trap ctrl_c INT
if [[ ! -f "config/master.sh" ]]; then
@ -100,12 +100,12 @@ if [[ $1 == "init" ]]; then # will get replaced with proper parameter parsing in
LauraIsCute
cat <<LauraIsCute > "${cfg[namespace]}/workers/example/worker.sh"
#!/bin/bash
#!/usr/bin/env bash
date
LauraIsCute
cat <<LauraIsCute > "${cfg[namespace]}/${cfg[root]}/index.shs"
#!/bin/bash
#!/usr/bin/env bash
source templates/head.sh
echo "<h1>Hello from HTTP.sh!</h1><br>To get started with your app, check out $(pwd)/${cfg[namespace]}/
<ul><li>$(pwd)/${cfg[namespace]}/${cfg[root]} - your (public) files go here</li>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# account.sh - account and session mgmt

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# mail.sh - basic SMTP handler
# mailgen(from, to, subject, msg)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# mime.sh - determine what Content-Type should be passed on
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# misc.sh - miscellaneous functions
# set_cookie(cookie_name, cookie_content)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
url="$(url_decode "$(url_decode "$(sed -E 's/\?/<2F><>Lun4_iS_CuTe<54>/;s/^(.*)<29><>Lun4_iS_CuTe<54>//;s/'"${cfg[proxy_param]}"'=//g' <<< "${r[url]}")")")"
if [[ $(grep -Poh "${cfg[proxy_url]}" <<< "$url") == '' ]]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# route.sh - basic router stub
# router(uri, path)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
source config/master.sh
source src/mime.sh
source src/misc.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# template.sh - basic templating engine
# render(array, template_file)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# worker.sh - setup and control of workers

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo '<!DOCTYPE html>
<head>
<meta charset="utf-8">