diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-02-14 12:14:25 +0300 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-02-14 12:14:25 +0300 |
commit | f0354c13bd81a3d3f242b3f39cbf582036fe21f8 (patch) | |
tree | ce01edb070eb039a0d28c871c67c52832485a073 /setup | |
parent | b3ae041e22c223cc1e8015f2744b28abfb0ff46e (diff) |
make getarg known (from Univention)
Diffstat (limited to 'setup')
-rw-r--r-- | setup | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -19,6 +19,18 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +getarg() { # by Univention + local found=0 + for arg in "${ARGS[@]}"; do + if [ "$found" -eq 1 ]; then + echo "$arg" + break + fi + if [ "$arg" = "$1" ]; then + found=1 + fi + done +} ERROR_FILE=$(getarg "--error-file") error_msg() { |