mirror of https://github.com/curusarn/resh
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
617 B
27 lines
617 B
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
while ! git --version &>/dev/null; do
|
|
echo "Please install git."
|
|
echo "Check again? (Any key to check again / Ctrl+C to exit)"
|
|
# shellcheck disable=2162 disable=2034
|
|
read x
|
|
echo
|
|
done
|
|
|
|
resh_git_dir=~/.resh_git
|
|
if [ ! -d "$resh_git_dir" ]; then
|
|
git clone https://github.com/curusarn/resh.git "$resh_git_dir"
|
|
echo "Cloned https://github.com/curusarn/resh.git to $resh_git_dir"
|
|
echo
|
|
fi
|
|
|
|
echo "Pulling the latest version of RESH ..."
|
|
cd "$resh_git_dir"
|
|
git checkout master
|
|
git pull
|
|
echo "Successfully pulled the latest version!"
|
|
|
|
make autoinstall
|
|
|
|
|