update: install.sh: use git rev-parse

This commit is contained in:
qwjyh 2023-08-20 19:24:31 +09:00
parent e6af2d5afc
commit 6d40be6cf6

View file

@ -4,12 +4,13 @@ set -eu
# ========================================================= # =========================================================
# check executing location # check executing location
# ========================================================= # =========================================================
if [ ! -d "bin" -a ! -d "dotfiles" ]; then # if [ ! -d "bin" -a ! -d "dotfiles" ]; then
echo "Wrong execution location" # echo "Wrong execution location"
echo "Please run this script on dotfiles root folder." # echo "Please run this script on dotfiles root folder."
exit 1 # exit 1
fi # fi
# TODO: check git in path
cd $(git rev-parse --show-toplevel)
# ========================================================= # =========================================================
# links # links