Skip to content

Commit

Permalink
Dotfiles init
Browse files Browse the repository at this point in the history
  • Loading branch information
dufkan committed Mar 2, 2019
0 parents commit b26bbae
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "dotbot"]
path = dotbot
url = https://github.com/anishathalye/dotbot
1 change: 1 addition & 0 deletions dotbot
Submodule dotbot added at b062ae
23 changes: 23 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -e

CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"

DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

if [ -z $1 ]; then
echo "Please, select name of machine to install."
exit 1
fi

MACHINE=$1
shift

cd "${BASEDIR}"
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive "${DOTBOT_DIR}"

"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}/${MACHINE}" -c "${BASEDIR}/${MACHINE}/${CONFIG}" "${@}"

0 comments on commit b26bbae

Please sign in to comment.