#!/bin/bash # Made by Innovative Inventor at https://github.com/innovativeinventor. # If you like this code, star it on GitHub! # Contributions are always welcome. # MIT License # Copyright (c) 2017 InnovativeInventor # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # Options VERSION="2.3" clone_depth="1" text="spellcheck.txt" while [[ $# -gt 0 ]] do key="$1" case $key in -p|--package) package="$2" build=YES specifypackage=YES shift # past argument shift # past value ;; -o|--override) OSTYPE="$2" shift # past argument shift # past value ;; -c|--command) command="$2" shift # past argument shift # past value ;; -t|--text) text="$2" shift # past argument shift # past value ;; -r|--remove) remove="$2" uninstall=YES shift # past argument shift # past value ;; -b|--build) build=YES shift # past argument ;; -d|--depth) clone_depth="$2" build=YES shift # past argument shift # past value ;; -h|--help) help=YES shift # past argument ;; -q|--quiet) quiet=YES shift # past argument ;; -a|--accept) accept=YES shift # past argument ;; esac done display_help() { echo echo "Script version $VERSION" echo 'A tool for installing or building LanguageTool.' echo 'Usage: install.sh