Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hooks to source scripts before and after setup #244

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/common/git-aliases.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
echo
echo "Setting up Git aliases..."
git config --global alias.gst git status
git config --global alias.gst "git status"
git config --global alias.st status
git config --global alias.di diff
git config --global alias.co checkout
Expand Down
14 changes: 14 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ sudo -K
sudo true;
clear

pre_setup_dir="$HOME/.pivotal-workstation-pre-setup"
if [ -d "$pre_setup_dir" ]; then
for file in $(ls "$pre_setup_dir"); do
source "$pre_setup_dir/$file"
done
fi

MY_DIR="$(dirname "$0")"
SKIP_ANALYTICS=${SKIP_ANALYTICS:-0}
if (( SKIP_ANALYTICS == 0 )); then
Expand Down Expand Up @@ -56,6 +63,13 @@ do
fi
done

post_setup_dir="$HOME/.pivotal-workstation-post-setup"
if [ -d "$post_setup_dir" ]; then
for file in $(ls "$post_setup_dir"); do
source "$post_setup_dir/$file"
done
fi

source ${MY_DIR}/scripts/common/finished.sh
if (( SKIP_ANALYTICS == 0 )); then
source ${MY_DIR}/scripts/helpers/google-analytics.sh ${clientID} finish $@
Expand Down