diff --git a/pkg/cli/scripts/build.sh b/pkg/cli/scripts/build.sh index 680173bf..f2946d6d 100755 --- a/pkg/cli/scripts/build.sh +++ b/pkg/cli/scripts/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # build.sh compiles dnote binary for target platforms. It is resonsible for creating # distributable files that can be released by a human or a script. diff --git a/pkg/cli/scripts/dev.sh b/pkg/cli/scripts/dev.sh index db30b7d0..3fd8eff7 100755 --- a/pkg/cli/scripts/dev.sh +++ b/pkg/cli/scripts/dev.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # dev.sh builds a new binary and replaces the old one in the PATH with it set -eux diff --git a/pkg/cli/scripts/dump_schema.sh b/pkg/cli/scripts/dump_schema.sh index 52cfac58..ff0ed5a3 100755 --- a/pkg/cli/scripts/dump_schema.sh +++ b/pkg/cli/scripts/dump_schema.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # dump_schema.sh dumps the current system's dnote schema set -eux diff --git a/pkg/cli/scripts/test.sh b/pkg/cli/scripts/test.sh index 9320733b..042bfd48 100755 --- a/pkg/cli/scripts/test.sh +++ b/pkg/cli/scripts/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # run_server_test.sh runs server test files sequentially # https://stackoverflow.com/questions/23715302/go-how-to-run-tests-for-multiple-packages diff --git a/pkg/server/api/scripts/build.sh b/pkg/server/api/scripts/build.sh index 77a332f9..709e44ac 100755 --- a/pkg/server/api/scripts/build.sh +++ b/pkg/server/api/scripts/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eux basePath="$GOPATH/src/github.com/dnote/dnote/pkg/server/api" diff --git a/pkg/server/api/scripts/setup.sh b/pkg/server/api/scripts/setup.sh index afd6a387..a1230d71 100755 --- a/pkg/server/api/scripts/setup.sh +++ b/pkg/server/api/scripts/setup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # setup.sh installs programs and depedencies necessary to run the project locally # usage: ./setup.sh set -eux diff --git a/pkg/server/api/scripts/test-local.sh b/pkg/server/api/scripts/test-local.sh index 12f0b2bb..6dda98a0 100755 --- a/pkg/server/api/scripts/test-local.sh +++ b/pkg/server/api/scripts/test-local.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC1090 # test-local.sh runs api tests using local setting set -eux diff --git a/pkg/server/api/scripts/test.sh b/pkg/server/api/scripts/test.sh index 6e9d3fa8..b4f09257 100755 --- a/pkg/server/api/scripts/test.sh +++ b/pkg/server/api/scripts/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # test.sh runs api tests. It is to be invoked by other scripts that set # appropriate env vars. set -eux diff --git a/pkg/server/database/scripts/create-migration.sh b/pkg/server/database/scripts/create-migration.sh index f185be82..ef168165 100755 --- a/pkg/server/database/scripts/create-migration.sh +++ b/pkg/server/database/scripts/create-migration.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # create-migration.sh creates a new SQL migration file for the # server side Postgres database using the sql-migrate tool. set -eux diff --git a/pkg/server/database/scripts/install-sql-migrate.sh b/pkg/server/database/scripts/install-sql-migrate.sh index 73938dac..334fb817 100755 --- a/pkg/server/database/scripts/install-sql-migrate.sh +++ b/pkg/server/database/scripts/install-sql-migrate.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash go get -v github.com/rubenv/sql-migrate/... diff --git a/pkg/server/scripts/build.sh b/pkg/server/scripts/build.sh index efd7d6b8..8843a8d2 100755 --- a/pkg/server/scripts/build.sh +++ b/pkg/server/scripts/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eux version=$1 diff --git a/scripts/license.sh b/scripts/license.sh index 90655f79..7042e445 100755 --- a/scripts/license.sh +++ b/scripts/license.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function remove_notice { sed -i -e '/\/\* Copyright/,/\*\//d' "$1" diff --git a/scripts/release.sh b/scripts/release.sh index 9fe36980..64208ab2 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # release.sh releases the tarballs and checksum in the build directory # to GitHub and brew. A prerequisite is to build those files using build.sh. diff --git a/web/scripts/build-prod.sh b/web/scripts/build-prod.sh index 0ce6a568..726796bc 100755 --- a/web/scripts/build-prod.sh +++ b/web/scripts/build-prod.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # build.sh builds a production bundle set -eux diff --git a/web/scripts/build.sh b/web/scripts/build.sh index 08f95944..4d1fd711 100755 --- a/web/scripts/build.sh +++ b/web/scripts/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # build.sh builds a bundle set -ex diff --git a/web/scripts/dev.sh b/web/scripts/dev.sh index ee3b0089..212a1983 100755 --- a/web/scripts/dev.sh +++ b/web/scripts/dev.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC1090 # dev.sh builds and starts development environment for standalone app set -eux -o pipefail diff --git a/web/scripts/setup.sh b/web/scripts/setup.sh index a377c2cb..7b77244a 100755 --- a/web/scripts/setup.sh +++ b/web/scripts/setup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # setup.sh prepares the directory structure and copies static files set -eux -o pipefail diff --git a/web/scripts/webpack-dev.sh b/web/scripts/webpack-dev.sh index d839775e..63c14ea5 100755 --- a/web/scripts/webpack-dev.sh +++ b/web/scripts/webpack-dev.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eux basePath="$GOPATH/src/github.com/dnote/dnote"