#!/bin/bash # Git cLONE cD git clone "$1" || return $? if ! cd "$(echo "$1" | sed 's/\.git//g' | rev | cut -d '/' -f 1 | rev)";then echo 'Error: Could not `cd` into the repo' return 1 fi echo # ls --color=auto