Compare commits

..
3 Commits
Author SHA1 Message Date
AverageMarcus 21dc2e7a00 Update git take command
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-12-03 18:42:46 +00:00
AverageMarcus 0b43014820 Ignore kube files
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-12-03 18:23:52 +00:00
AverageMarcus 09248c19cd Fix exec perm
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-12-03 18:20:33 +00:00
14 changed files with 21 additions and 6 deletions
+3
View File
@@ -25,3 +25,6 @@
/os-specific/darwin/home/.gnupg/*
!/os-specific/darwin/home/.gnupg/gpg-agent.conf
/home/.kube/*
!/home/.kube/clusters
!/home/.kube/switch-config.yaml
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+13 -2
View File
@@ -45,8 +45,19 @@ lt() {
git() {
if [ "$1" = "take" ]; then # Git clone then cd into new directory
_git clone $2
cd $(basename $2 | sed 's/\.git$//')
if [ $# -gt 2 ]; then
_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
shift
_git commit -s $@
+5 -4
View File
@@ -5,6 +5,7 @@ export PATH="/home/linuxbrew/.linuxbrew/bin:/opt/homebrew/bin/:$PATH"
GITEMAIL=$(git config --get user.email)
[ -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
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` ]
then
greadlink -f $1
else
else
readlink -f $1
fi
}
@@ -79,14 +80,14 @@ case "${OSTYPE}" in
;;
*darwin*)
# 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[@]}"
do
printf "${tool}..."
brew upgrade ${tool} &>/dev/null || brew install ${tool} &>/dev/null
printf " ✅\n"
done
FILES=$(find ./os-specific/darwin/home -maxdepth 1 -mindepth 1 | tr '\n' ' ')
for file in $FILES
@@ -118,4 +119,4 @@ do
printf "Linking ${f}=>${dst}"
ln -sfn ${f} ${dst}
printf " ✅\n"
done
done