Skip to content
Snippets Groups Projects
Commit 3b271e82 authored by nimrod's avatar nimrod
Browse files

Don't use /dev/stderr.

In some cases (like a chroots or containers with minimal /dev)
/dev/stderr is not available. Replace outputting to fd 2 instead.

git grep -l '>> /dev/stderr' | xargs sed -i 's@>> /dev/stderr@>\&2@g'
parent b7a55589
No related branches found
No related tags found
No related merge requests found
...@@ -279,7 +279,7 @@ match_ssl_pair () { ...@@ -279,7 +279,7 @@ match_ssl_pair () {
flatpak_kill () { flatpak_kill () {
if [ "$#" -lt 1 ] if [ "$#" -lt 1 ]
then then
echo "You must specify application name." >> /dev/stderr echo "You must specify application name." >&2
false false
else else
name="$1" name="$1"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
set -eux set -eux
eval "$(grep 'export HELM_HOME' .bashrc)" eval "$(grep 'export HELM_HOME' .bashrc)"
cd "$(git rev-parse --show-toplevel)" cd "$(git rev-parse --show-toplevel)"
echo Installing Golang apps >> /dev/stderr echo Installing Golang apps >&2
go get github.com/giantswarm/semver-bump || true go get github.com/giantswarm/semver-bump || true
go get github.com/nishanths/license || true go get github.com/nishanths/license || true
go get github.com/jmespath/jp || true go get github.com/jmespath/jp || true
...@@ -10,22 +10,22 @@ go get github.com/spelufo/on-change || true ...@@ -10,22 +10,22 @@ go get github.com/spelufo/on-change || true
go get github.com/kaorimatz/mysqldump-loader || true go get github.com/kaorimatz/mysqldump-loader || true
go get github.com/lucagrulla/cw || true go get github.com/lucagrulla/cw || true
go get sigs.k8s.io/kind || true go get sigs.k8s.io/kind || true
echo Installing Python apps >> /dev/stderr echo Installing Python apps >&2
python3 -m pip install --user --requirement requirements.txt python3 -m pip install --user --requirement requirements.txt
echo Downloading binary and vendored files, creating generated files >> /dev/stderr echo Downloading binary and vendored files, creating generated files >&2
git clean -fX .bash_completion.d/ git clean -fX .bash_completion.d/
make all make all
echo Installing Git hooks >> /dev/stderr echo Installing Git hooks >&2
Documents/bin/install-git-hooks Documents/bin/install-git-hooks
echo Loading dconf config >> /dev/stderr echo Loading dconf config >&2
Documents/bin/dconf-load Documents/bin/dconf-load
echo Configuring Git repo >> /dev/stderr echo Configuring Git repo >&2
git config --local status.showUntrackedFiles no git config --local status.showUntrackedFiles no
echo Adding Cron job >> /dev/stderr echo Adding Cron job >&2
Documents/bin/cron-jobs Documents/bin/cron-jobs
if command -v vagrant > /dev/null if command -v vagrant > /dev/null
then then
echo Installing Vagrant plugins >> /dev/stderr echo Installing Vagrant plugins >&2
for plugin in landrush vagrant-gatling-rsync for plugin in landrush vagrant-gatling-rsync
do do
vagrant plugin list | grep -qw "$plugin" || vagrant plugin install "$plugin" || true vagrant plugin list | grep -qw "$plugin" || vagrant plugin install "$plugin" || true
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
set -eu set -eu
[ -n "$1" ] || { echo "You must specify host." >> /dev/stderr; exit 1; } [ -n "$1" ] || { echo "You must specify host." >&2; exit 1; }
host="$1" host="$1"
localsocket="$HOME/.ssh/docker_$host.sock" localsocket="$HOME/.ssh/docker_$host.sock"
......
#!/bin/sh #!/bin/sh
set -eu set -eu
[ "$#" -gt '0' ] || { echo "Output not specified." >> /dev/stderr; return 1; } [ "$#" -gt '0' ] || { echo "Output not specified." >&2; return 1; }
while [ "$#" -gt '1' ] while [ "$#" -gt '1' ]
do do
args="${args:-} $1" args="${args:-} $1"
......
...@@ -5,8 +5,8 @@ usage () { ...@@ -5,8 +5,8 @@ usage () {
echo "Usage: $0 host forward" echo "Usage: $0 host forward"
} }
host="$1" || { usage >> /dev/stderr; exit 1; } host="$1" || { usage >&2; exit 1; }
forward="$2" || { usage >> /dev/stderr; exit 1; } forward="$2" || { usage >&2; exit 1; }
alias ssh='ssh -fnNTS ~/.ssh/%C.sock' alias ssh='ssh -fnNTS ~/.ssh/%C.sock'
# shellcheck disable=SC2029 # shellcheck disable=SC2029
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment