File tree Expand file tree Collapse file tree 4 files changed +25
-6
lines changed
Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 11# git-config
22
3- # Setup
3+ # Quick start
4+ 1 . curl https://raw.githubusercontent.com/andylytical/git-config/master/quickstart.sh | bash
5+
6+
7+ # Slow start
481 . git clone https://github.com/andylytical/git-config.git
591 . cd git-config
6101 . ./setup.sh
Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ alias gdiff='git diff --color-words master...$(git rev-parse --abbrev-ref HEAD)'
55alias rmtopics=' git branch | grep topic | grep -vE "^\*|\/$USER\/" | xargs -n1 git branch -d'
66
77# Alias to quickly switch between puppet devops repos
8- alias repo=' cd ~/puppet; cd'
8+ # Example: "repo git-config" ... yields ... "cd ~/working; cd git-config"
9+ alias repo=' cd ~/working; cd'
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ tmpdir=$( mktemp -d)
4+ GIT=$( which git)
5+ [[ -z " $GIT " ]] && {
6+ echo " ERROR: Cmd 'git' not found. Is 'git' installed?" >&2
7+ echo " Exiting." >&2
8+ exit 1
9+ }
10+ git clone https://github.com/andylytical/git-config.git $tmpdir /repo
11+ $tmpdir /repo/setup.sh
12+ rm -rf $tmpdir
Original file line number Diff line number Diff line change 22
33set -x
44
5+ BASE=$( dirname $0 )
56TS=$( date +%s)
67
78# Install regular dir contents
89for d in bin ; do
910 tgt=" $HOME /$d "
10- src=" . /$d "
11+ src=" $BASE /$d "
1112 mkdir -p " $tgt "
1213 find " $src " -type f -print \
1314 | xargs install -vbC --suffix=" $TS " -t " $tgt "
1617# Install DOT dir contents
1718for d in bashrc.d ; do
1819 tgt=" $HOME /.$d "
19- src=" . /$d "
20+ src=" $BASE /$d "
2021 mkdir -p " $tgt "
2122 find " $src " -type f -print \
2223 | xargs install -vbC --suffix=" $TS " -t " $tgt "
2324done
2425
2526# Run mk_* files
26- find " . /bin" -type f -executable -name ' mk_*' -printf ' %f\n' \
27+ find " $BASE /bin" -type f -executable -name ' mk_*' -printf ' %f\n' \
2728| while read ; do
28- " $HOME /bin/$REPLY "
29+ runme=" $HOME /bin/$REPLY "
30+ [[ -x " $runme " ]] && " $runme "
2931done
3032
3133echo
You can’t perform that action at this time.
0 commit comments