Skip to content

Commit

Permalink
Replace references to /bin/bash with /usr/bin/env bash
Browse files Browse the repository at this point in the history
/bin/bash is not available on all distros. (eg. NixOS)
  • Loading branch information
duck1123 committed Aug 30, 2024
1 parent 639d751 commit ca4525b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions backend/src/rvbbit_backend/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@
;; (println " ")
;; (wss/fig-render "Curiouser and curiouser!" :pink)

(shell/sh "/bin/bash" "-c" (str "rm -rf " "live/*"))
(shell/sh "/usr/bin/env" "bash" "-c" (str "rm -rf " "live/*"))

(qp/create-slot-queue-system)
(fpop/thaw-flow-results)
Expand Down Expand Up @@ -1097,13 +1097,13 @@
(ut/zprint-file "./defs/signals.edn" {:style [:justified-original] :parse-string? true :comment {:count? nil :wrap? nil} :width 120 :map {:comma? false :sort? false}})
(ut/zprint-file "./defs/solvers.edn" {:style [:justified-original] :parse-string? true :comment {:count? nil :wrap? nil} :width 120 :map {:comma? false :sort? false}})
;(ut/ppa [:clearing-cache-db])
;(shell/sh "/bin/bash" "-c" (str "rm " "db/cache.db"))
(shell/sh "/bin/bash" "-c" (str "rm " "flow-logs/*"))
(shell/sh "/bin/bash" "-c" (str "rm " "reaction-logs/*"))
;(shell/sh "/bin/bash" "-c" (str "rm " "status-change-logs/*"))
(shell/sh "/bin/bash" "-c" (str "rm " "tracker-logs/*"))
(shell/sh "/bin/bash" "-c" (str "rm " "reaction-logs/*"))
;(shell/sh "/bin/bash" "-c" (str "rm " "db/system.db"))
;(shell/sh "/usr/bin/env" "bash" "-c" (str "rm " "db/cache.db"))
(shell/sh "/usr/bin/env" "bash" "-c" (str "rm " "flow-logs/*"))
(shell/sh "/usr/bin/env" "bash" "-c" (str "rm " "reaction-logs/*"))
;(shell/sh "/usr/bin/env" "bash" "-c" (str "rm " "status-change-logs/*"))
(shell/sh "/usr/bin/env" "bash" "-c" (str "rm " "tracker-logs/*"))
(shell/sh "/usr/bin/env" "bash" "-c" (str "rm " "reaction-logs/*"))
;(shell/sh "/usr/bin/env" "bash" "-c" (str "rm " "db/system.db"))
))

(ppy/add-watch+
Expand Down
4 changes: 2 additions & 2 deletions backend/src/rvbbit_backend/websockets.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@
[command]
(let [;;shell (or (System/getenv "SHELL") "/bin/sh")
;;output (shell/sh shell "-c" (str "mkdir -p shell-root ; cd shell-root ; " command))
output (shell/sh "/bin/bash" "-c" (str "mkdir -p shell-root ; cd shell-root ; " command))
output (shell/sh "/usr/bin/env" "bash" "-c" (str "mkdir -p shell-root ; cd shell-root ; " command))
split-lines (vec (remove empty? (cstr/split-lines (get output :out))))
exit-code (get output :exit)
error (vec (remove empty? (cstr/split-lines (get output :err))))
Expand Down Expand Up @@ -7421,7 +7421,7 @@
[command]
(let [;;shell (or (System/getenv "SHELL") "/bin/sh")
;;output (shell/sh shell "-c" (str "mkdir -p shell-root ; cd shell-root ; " command))
output (shell/sh "/bin/bash" "-c" (str "mkdir -p shell-root ; cd shell-root ; " command))
output (shell/sh "/usr/bin/env" "bash" "-c" (str "mkdir -p shell-root ; cd shell-root ; " command))
split-lines (vec (remove empty? (cstr/split-lines (get output :out))))
exit-code (get output :exit)
error (vec (remove empty? (cstr/split-lines (get output :err))))
Expand Down
2 changes: 1 addition & 1 deletion compile_all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Check if the current directory path ends with "rvbbit"
if [[ "${PWD}" != */rvbbit ]]; then
Expand Down
2 changes: 1 addition & 1 deletion zprint-config.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

DIRECTORY="backend/defs"

Expand Down
2 changes: 1 addition & 1 deletion zprint-flows.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

DIRECTORY="backend/flows"

Expand Down
2 changes: 1 addition & 1 deletion zprint-screens.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

DIRECTORY="backend/screens"

Expand Down

0 comments on commit ca4525b

Please sign in to comment.