Commit 89a84840 authored by Mattia Rizzolo's avatar Mattia Rizzolo

drop unused function

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mapreri@ubuntu.com>
parent 60db2121
MIT License
Copyright (c) 2017 Pietro Albini <pietro@pietroalbini.org>
Copyright (c) 2017 Pietro Albini <pietro@pietroalbini.org>
Copyright (c) 2019-2020 Mattia Rizzolo <mapreri@ubuntu.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -8,28 +8,6 @@ if [[ "$(whoami)" != "ubuntu-it" ]]; then
exit 1
fi
chronic_sh (){
local pipe pipe_q
pipe=$(mktemp -p "${TMPDIR:-/tmp}" chronic_sh.XXXXXXXXXX)
printf -v pipe_q '%q' "$pipe"
trap 'rm -fv '"$pipe_q" RETURN
# one can't open a reading fd and a writing fd without blocking, because
# they want to already have something on the other side of the pipe.
# the temporary fd 5 will be that something.
exec 5<>"$pipe" # hack
exec 3>"$pipe" # writing fd
exec 4<"$pipe" # reading fd
exec 5>&- # end hack
rm "$pipe"
local ret=0
"$@" >&3 2>&3 || ret=$?
if [ "$ret" -ne 0 ] ; then
exec 3>&-
cat <&4-
return $ret
fi
}
# Try to deploy all the websites
for script in "${base}/scripts/"*; do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment