#!/bin/sh set -e REPO_URL=https://github.com/zedeus/nitter.git REPO_DIR_PATH=nitter # If repo exists update, else clone it if [ -d "$REPO_DIR_PATH" ]; then # Save the root dir path, enter the repo, pull new changes and come back ROOT_DIR=$(pwd) cd "$REPO_DIR_PATH" git pull cd "$ROOT_DIR" else git clone "$REPO_URL" "$REPO_DIR_PATH" fi