Skip to content

Instantly share code, notes, and snippets.

@Lexty
Lexty / bash.sh
Created February 21, 2018 10:38 — forked from hugocf/bash.sh
Template for interactive bash scripts: supports command line options with values; prompts for any missing parameters/arguments.
#!/usr/bin/env bash
# Created by Hugo Ferreira <[email protected]> on isoD.
# Copyright (c) 2012 Mindclick. All Rights Reserved.
# Licensed under the BSD License: http://creativecommons.org/licenses/BSD
readonly BASEDIR=$(cd "$(dirname "$0")" && pwd) # where the script is located
readonly CALLDIR=$(pwd) # where it was called from
readonly STATUS_SUCCESS=0 # exit status for commands
# Script configuration