Skip to content

Commit 7e56d0c

Browse files
smortexjordanbreen28
authored andcommitted
Fix shebangs
`bash(1)` is not always installed in `/bin`, we can only assume `/bin/sh` is a bourne shell, and for any other non-portable shell rely on `env(1)` (always available as `/usr/bin/env`) to find the appropriate command in `$PATH`. While here, remove shebangs from non-executable files.
1 parent 13b2930 commit 7e56d0c

File tree

5 files changed

+1
-9
lines changed

5 files changed

+1
-9
lines changed

files/apt.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/bin/bash
2-
31
# $1 = string literal to feed to dpkg-query. include json formatting
42
# No error check here because querying the status of uninstalled packages will return non-zero
53
# Use --showformat to make a json object with status and version

files/common.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/bin/bash
2-
31
# TODO: helper task?
42

53
# Exit with an error message and error code, defaulting to 1

files/yum.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/bin/bash
2-
31
# $1 = string literal to feed to rpm -q. include json formatting
42
# Use --queryformat to make a json object with status and version
53
# yum returns non-zero if the package isn't installed

files/zypper.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/bin/bash
2-
31
# zypper supports xml output for parsing, but we're not guaranteed to have a parser
42
zypper_status() {
53
installed_version

tasks/linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# example: bolt task run package::linux action=install name=rsyslog
44

0 commit comments

Comments
 (0)