Skip to content

Commit 507b6b0

Browse files
author
Johnny Robeson
committed
add $app_dir var to point to application root
This is about the same as the %BASE_DIR% var in the windows scripts
1 parent ebd410b commit 507b6b0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

bootstrap.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
############################ SETUP PARAMETERS
33
app_name='spf13-vim'
4+
app_dir="$HOME/.spf13-vim-3"
45
[ -z "$git_uri" ] && git_uri='https://github.com/spf13/spf13-vim.git'
56
git_branch='3.0'
67
debug_mode='0'
@@ -64,7 +65,7 @@ upgrade_repo() {
6465
msg "trying to update $1"
6566

6667
if [ "$1" = "$app_name" ]; then
67-
cd "$HOME/.$app_name-3" &&
68+
cd "$app_dir" &&
6869
git pull origin "$git_branch"
6970
fi
7071

@@ -80,10 +81,9 @@ upgrade_repo() {
8081

8182
clone_repo() {
8283
program_exists "git" "Sorry, we cannot continue without GIT, please install it first."
83-
endpath="$HOME/.$app_name-3"
8484

85-
if [ ! -e "$endpath/.git" ]; then
86-
git clone --recursive -b "$git_branch" "$git_uri" "$endpath"
85+
if [ ! -e "$app_dir" ]; then
86+
git clone --recursive -b "$git_branch" "$git_uri" "$app_dir"
8787
ret="$?"
8888
success "$1"
8989
debug
@@ -104,7 +104,7 @@ clone_vundle() {
104104
}
105105

106106
create_symlinks() {
107-
endpath="$HOME/.$app_name-3"
107+
endpath="$app_dir"
108108

109109
if [ ! -d "$endpath/.vim/bundle" ]; then
110110
mkdir -p "$endpath/.vim/bundle"

uninstall.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
endpath="$HOME/.spf13-vim-3"
3+
app_dir="$HOME/.spf13-vim-3"
44

55
warn() {
66
echo "$1" >&2
@@ -15,4 +15,4 @@ rm $HOME/.vimrc
1515
rm $HOME/.vimrc.bundles
1616
rm $HOME/.vim
1717

18-
rm -rf $endpath
18+
rm -rf $app_dir

0 commit comments

Comments
 (0)