From 64156e7ddaf2e11a25e872bacf9f63066fe94554 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 12 Aug 2017 17:43:07 +0100 Subject: [PATCH] Build zshrc --- {bash => modules/shell/files}/.zshrc | 3 --- {bash => modules/shell/files}/applications.sh | 0 {bash => modules/shell/files}/base.sh | 4 ---- {bash => modules/shell/files}/catfish.sh | 0 {bash => modules/shell/files}/javascript.sh | 0 modules/shell/manifests/init.pp | 24 +++++++++++++++++++ 6 files changed, 24 insertions(+), 7 deletions(-) rename {bash => modules/shell/files}/.zshrc (90%) rename {bash => modules/shell/files}/applications.sh (100%) rename {bash => modules/shell/files}/base.sh (85%) rename {bash => modules/shell/files}/catfish.sh (100%) rename {bash => modules/shell/files}/javascript.sh (100%) diff --git a/bash/.zshrc b/modules/shell/files/.zshrc similarity index 90% rename from bash/.zshrc rename to modules/shell/files/.zshrc index 47cd248..5fff79d 100644 --- a/bash/.zshrc +++ b/modules/shell/files/.zshrc @@ -28,6 +28,3 @@ COMPLETION_WAITING_DOTS="true" alias src="source $HOME/.zshrc" -export DOTFILES="$HOME/.dotfiles" - -source $DOTFILES/bash/base.sh diff --git a/bash/applications.sh b/modules/shell/files/applications.sh similarity index 100% rename from bash/applications.sh rename to modules/shell/files/applications.sh diff --git a/bash/base.sh b/modules/shell/files/base.sh similarity index 85% rename from bash/base.sh rename to modules/shell/files/base.sh index 1357e2d..0132131 100644 --- a/bash/base.sh +++ b/modules/shell/files/base.sh @@ -4,10 +4,6 @@ case $- in *) return;; esac -source $DOTFILES/bash/catfish.sh -source $DOTFILES/bash/javascript.sh -source $DOTFILES/bash/applications.sh -[ -s "$DOTFILES/bash/private.sh" ] && source "$DOTFILES/bash/private.sh" # load private stuff # Export some variables export ANDROID_HOME=/opt/android-sdk diff --git a/bash/catfish.sh b/modules/shell/files/catfish.sh similarity index 100% rename from bash/catfish.sh rename to modules/shell/files/catfish.sh diff --git a/bash/javascript.sh b/modules/shell/files/javascript.sh similarity index 100% rename from bash/javascript.sh rename to modules/shell/files/javascript.sh diff --git a/modules/shell/manifests/init.pp b/modules/shell/manifests/init.pp index 495b573..01a84eb 100644 --- a/modules/shell/manifests/init.pp +++ b/modules/shell/manifests/init.pp @@ -1,2 +1,26 @@ class shell { + $zshrc = "/home/jake/.zshrc" + + $files = [ + "puppet:///modules/shell/.zshrc", + "puppet:///modules/shell/base.sh", + "puppet:///modules/shell/applications.sh", + "puppet:///modules/shell/catfish.sh", + "puppet:///modules/shell/javascript.sh" + ]; + + concat {"zshrc": + path => $zshrc, + owner => "jake", + group => "users", + mode => "0644", + ensure_newline => true + } + + $files.each |String $file| { + concat::fragment {"zshrc concat $file": + target => $zshrc, + source => $file + } + } }