Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/univention-app.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-02-14 12:14:25 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-02-14 12:14:25 +0300
commitf0354c13bd81a3d3f242b3f39cbf582036fe21f8 (patch)
treece01edb070eb039a0d28c871c67c52832485a073 /setup
parentb3ae041e22c223cc1e8015f2744b28abfb0ff46e (diff)
make getarg known (from Univention)
Diffstat (limited to 'setup')
-rw-r--r--setup12
1 files changed, 12 insertions, 0 deletions
diff --git a/setup b/setup
index 26f04a9..6f08c5d 100644
--- a/setup
+++ b/setup
@@ -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() {