Compare commits
3 Commits
57ee208407
...
21dc2e7a00
Author | SHA1 | Date | |
---|---|---|---|
21dc2e7a00 | |||
0b43014820 | |||
09248c19cd |
3
.gitignore
vendored
3
.gitignore
vendored
@ -25,3 +25,6 @@
|
|||||||
|
|
||||||
/os-specific/darwin/home/.gnupg/*
|
/os-specific/darwin/home/.gnupg/*
|
||||||
!/os-specific/darwin/home/.gnupg/gpg-agent.conf
|
!/os-specific/darwin/home/.gnupg/gpg-agent.conf
|
||||||
|
/home/.kube/*
|
||||||
|
!/home/.kube/clusters
|
||||||
|
!/home/.kube/switch-config.yaml
|
||||||
|
0
home/.bin/gs-create-cluster
Normal file → Executable file
0
home/.bin/gs-create-cluster
Normal file → Executable file
0
home/.bin/gs-get-cluster
Normal file → Executable file
0
home/.bin/gs-get-cluster
Normal file → Executable file
0
home/.bin/gs-login
Normal file → Executable file
0
home/.bin/gs-login
Normal file → Executable file
0
home/.bin/gs-release
Normal file → Executable file
0
home/.bin/gs-release
Normal file → Executable file
0
home/.bin/kube-all
Normal file → Executable file
0
home/.bin/kube-all
Normal file → Executable file
0
home/.bin/kube-clean-replicasets
Normal file → Executable file
0
home/.bin/kube-clean-replicasets
Normal file → Executable file
0
home/.bin/kube-exec
Normal file → Executable file
0
home/.bin/kube-exec
Normal file → Executable file
0
home/.bin/kube-forward-all
Normal file → Executable file
0
home/.bin/kube-forward-all
Normal file → Executable file
0
home/.bin/kube-logs
Normal file → Executable file
0
home/.bin/kube-logs
Normal file → Executable file
0
home/.bin/kube-shell
Normal file → Executable file
0
home/.bin/kube-shell
Normal file → Executable file
0
home/.bin/kube-ssh
Normal file → Executable file
0
home/.bin/kube-ssh
Normal file → Executable file
@ -45,8 +45,19 @@ lt() {
|
|||||||
|
|
||||||
git() {
|
git() {
|
||||||
if [ "$1" = "take" ]; then # Git clone then cd into new directory
|
if [ "$1" = "take" ]; then # Git clone then cd into new directory
|
||||||
_git clone $2
|
if [ $# -gt 2 ]; then
|
||||||
cd $(basename $2 | sed 's/\.git$//')
|
_git clone ${@:2}
|
||||||
|
cd $3
|
||||||
|
else
|
||||||
|
ORG=$(echo $2 | sed -e 's|https://||' -e 's|/| |g' -e 's|:| |g' | cut -f 2 -d ' ')
|
||||||
|
REPO=$(echo $2 | sed -e 's|https://||' -e 's|/| |g' -e 's|:| |g' | cut -f 3 -d ' ' | xargs basename -s .git)
|
||||||
|
|
||||||
|
DST="${HOME}/Code/${ORG}/${REPO}"
|
||||||
|
mkdir -p ${DST}
|
||||||
|
|
||||||
|
_git clone $2 ${DST}
|
||||||
|
cd ${DST}
|
||||||
|
fi
|
||||||
elif [ "$1" = "commit" ]; then # Sign all commits
|
elif [ "$1" = "commit" ]; then # Sign all commits
|
||||||
shift
|
shift
|
||||||
_git commit -s $@
|
_git commit -s $@
|
||||||
|
@ -5,6 +5,7 @@ export PATH="/home/linuxbrew/.linuxbrew/bin:/opt/homebrew/bin/:$PATH"
|
|||||||
GITEMAIL=$(git config --get user.email)
|
GITEMAIL=$(git config --get user.email)
|
||||||
|
|
||||||
[ -d ~/.additional_dotfiles ] || (mkdir -p ~/.additional_dotfiles && touch ~/.additional_dotfiles/credentials)
|
[ -d ~/.additional_dotfiles ] || (mkdir -p ~/.additional_dotfiles && touch ~/.additional_dotfiles/credentials)
|
||||||
|
[ -d /usr/local/share/zsh/site-functions ] || (sudo mkdir -p /usr/local/share/zsh/site-functions && sudo chmod 777 /usr/local/share/zsh/site-functions)
|
||||||
|
|
||||||
# Install homebrew
|
# Install homebrew
|
||||||
which brew >/dev/null || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
which brew >/dev/null || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
@ -65,7 +66,7 @@ fulllink() {
|
|||||||
if [ ! -z `which greadlink` ]
|
if [ ! -z `which greadlink` ]
|
||||||
then
|
then
|
||||||
greadlink -f $1
|
greadlink -f $1
|
||||||
else
|
else
|
||||||
readlink -f $1
|
readlink -f $1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -79,14 +80,14 @@ case "${OSTYPE}" in
|
|||||||
;;
|
;;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
# Mac specific setup
|
# Mac specific setup
|
||||||
MAC_BREW_TOOLS=( pinentry-mac gpg gawk coreutils )
|
MAC_BREW_TOOLS=( pinentry-mac gpg gawk coreutils wget )
|
||||||
for tool in "${MAC_BREW_TOOLS[@]}"
|
for tool in "${MAC_BREW_TOOLS[@]}"
|
||||||
do
|
do
|
||||||
printf "${tool}..."
|
printf "${tool}..."
|
||||||
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
|
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
|
||||||
printf " ✅\n"
|
printf " ✅\n"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
FILES=$(find ./os-specific/darwin/home -maxdepth 1 -mindepth 1 | tr '\n' ' ')
|
FILES=$(find ./os-specific/darwin/home -maxdepth 1 -mindepth 1 | tr '\n' ' ')
|
||||||
for file in $FILES
|
for file in $FILES
|
||||||
@ -118,4 +119,4 @@ do
|
|||||||
printf "Linking ${f}=>${dst}"
|
printf "Linking ${f}=>${dst}"
|
||||||
ln -sfn ${f} ${dst}
|
ln -sfn ${f} ${dst}
|
||||||
printf " ✅\n"
|
printf " ✅\n"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user