aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2022-12-11 23:09:52 +0100
committerNicholas Rodrigues Lordello <[email protected]>2023-12-12 23:30:25 +0100
commitca2bb41070a110895cd5a66a2d604b0eaf8b6c4d (patch)
tree2fe428cb76767fd0dca3b3366f57ad5caa463b94 /install.sh
parent7ef737c7a91fbf6f70896cd7a54a77fb1d1525e5 (diff)
Initial version of Codespace setup script
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/install.sh b/install.sh
index 914714f..91cb3d0 100755
--- a/install.sh
+++ b/install.sh
@@ -19,9 +19,11 @@ dotlink() {
}
gitinst() {
- if [[ ! -e "$2" ]]; then
- local remote="https://github.com/$1"
- git clone "$remote" "$2"
+ local remote="https://github.com/$1"
+ local dst="$HOME/$2"
+
+ if [ ! -e "$dst" ]; then
+ git clone "$remote" "$dst"
else
echo "skipping $1: '$2' already exists." >&2
fi
@@ -33,7 +35,7 @@ dotlink "config/emacs"
dotlink "config/nvim"
gitinst \
"wbthomason/packer.nvim" \
- "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim"
+ ".local/share/nvim/site/pack/packer/start/packer.nvim"
if which nvim &>/dev/null; then
nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerSync"