#!/bin/zsh
export DOTFILES_PATH=${DOTFILES_PATH:-~/dotfiles/public}

# Clone & config the public repository
mkdir -p ${DOTFILES_PATH}
cd ${DOTFILES_PATH}
git clone --recursive https://github.com/Benoth/dotfiles.git .
chmod u+x *.sh
git config --local user.email "benoth83@gmail.com"
git config --local user.name "Benoth"

# Bootstrap (create symlinks, etc) the public repository
[[ -f ./bootstrap.sh ]] && ./bootstrap.sh || echo "No boostrap file found"

# Clone & config the private repository
mkdir -p ${DOTFILES_PATH}/../private
cd ${DOTFILES_PATH}/../private
print -n "To clone the private repository, you need to provide its **HTTPS** address (just press Enter to abort) : "
read repo
if [[ -n "$repo" ]]; then
    git clone --recursive "$repo" .
    chmod u+x *.sh
    echo ""
    echo "Configure your repo with :"
    echo '  git config --local user.email ""'
    echo '  git config --local user.name ""'
    echo ""

    # Bootstrap (create symlinks, etc) the public repository
    [[ -f ./bootstrap.sh ]] && ./bootstrap.sh || echo "No boostrap file found"
fi

echo "All done. Re-run your session to finish the installation :)"

#!/bin/zsh
export DOTFILES_PATH=${DOTFILES_PATH:-~/dotfiles/public}

# Clone & config the public repository
mkdir -p ${DOTFILES_PATH}
cd ${DOTFILES_PATH}
git clone --recursive https://github.com/Benoth/dotfiles.git .
chmod u+x *.sh
git config --local user.email "benoth83@gmail.com"
git config --local user.name "Benoth"

# Bootstrap (create symlinks, etc) the public repository
[[ -f ./bootstrap.sh ]] && ./bootstrap.sh || echo "No boostrap file found"

# Clone & config the private repository
print -n "To clone the private repository, you need to provide its **HTTPS** address (just press Enter to abort) : "
read repo
if [[ -n "$repo" ]]; then
    mkdir -p ${DOTFILES_PATH}/../private
    cd ${DOTFILES_PATH}/../private
    git clone --recursive "$repo" .
    chmod u+x *.sh
    echo ""
    echo "Configure your repo with :"
    echo '  git config --local user.email ""'
    echo '  git config --local user.name ""'
    echo ""

    # Bootstrap (create symlinks, etc) the public repository
    [[ -f ./bootstrap.sh ]] && ./bootstrap.sh || echo "No boostrap file found"
fi

echo "All done. Re-run your session to finish the installation :)"

Create private dotfiles dir only if the repository is provided
Create private dotfiles dir only if the repository is provided
