url="https://github.com/eddieantonio/license" tmp_dir="$(mktemp -d)" trap 'rm -rf "$tmp_dir"' EXIT ( cd "$tmp_dir" git clone "$url" ( cd "$(basename "$url")" make PREFIX="$PREFIX" install ) ) # if [ -d "$HOME/.profile.d" ] && ! [ -e "$HOME/.profile.d/license.sh" ] # then # printf "Enter license owner: " # read license_owner # if [ -n "${license_owner:-}" ] # then # printf > "$HOME/.profile.d/license.sh" "%s\n" \ # "export LICENSE_OWNER='$( # printf "%s" "$license_owner" \ # | sed "s/'/'\\\\''/g" # )'" # fi # fi printf "Please set the environment variable LICENSE_OWNER.\n"