9f338f5464a63f1daf264c778963c87f1a7185cc

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Remove unused zsh functions

Diff

 1diff --git a/dot_config/zsh/functions/drsync b/dot_config/zsh/functions/drsync
 2deleted file mode 100644
 3index bc3a3b099677236dc726d22896bc60f9ec692574..0000000000000000000000000000000000000000
 4--- a/dot_config/zsh/functions/drsync
 5+++ /dev/null
 6@@ -1,23 +0,0 @@
 7-# vim: ft=zsh
 8-# rsync files to Dune EC2 instance
 9-
10-SSH_KEY="$HOME/.ssh/id_dune"
11-SSH_USER=ubuntu
12-AWS_DEFAULT_REGION=eu-west-1
13-export AWS_PROFILE=dune
14-INSTANCE_NAME=$(echo $2 | cut -d ":" -f 1)
15-
16-if [ -z "$INSTANCE_NAME" ]; then echo "Usage: dssh instance-name" && return 1; fi
17-INSTANCE_DETAILS=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=$INSTANCE_NAME" --output text --query 'Reservations[0].Instances[0].[InstanceId,Placement.AvailabilityZone]')
18-if [ $? -ne 0 ] ; then echo "Failed to describe instances. Check you are logged into AWS with MFA." && return 1; fi
19-if [ "$INSTANCE_DETAILS" = "None" ] ; then echo "Cannot find instance $INSTANCE_NAME. Check you are logged in to the correct AWS account and the instance exists." && return 1; fi
20-
21-aws ec2-instance-connect send-ssh-public-key \
22---instance-id $(echo "$INSTANCE_DETAILS" | awk '{print $1}') \
23---availability-zone $(echo "$INSTANCE_DETAILS" | awk '{print $2}') \
24---instance-os-user "$SSH_USER" \
25---ssh-public-key "file://$SSH_KEY.pub" \
26-|| (echo "Failed to send public key file://$SSH_KEY.pub to AWS" && return 1)
27-
28-# scp -i "$SSH_KEY" -r $1 "$SSH_USER@$2"
29-rsync -azP -e "ssh -i $SSH_KEY" $1 "$SSH_USER@$2"
30diff --git a/dot_config/zsh/functions/dssh b/dot_config/zsh/functions/dssh
31deleted file mode 100644
32index 67f6128a5cd377df1e271e520a41a50d8e94dc6d..0000000000000000000000000000000000000000
33--- a/dot_config/zsh/functions/dssh
34+++ /dev/null
35@@ -1,19 +0,0 @@
36-# vim: ft=zsh
37-# ssh into Dune EC2 instance
38-
39-SSH_KEY=~/.ssh/id_dune
40-SSH_USER=ubuntu
41-AWS_DEFAULT_REGION=eu-west-1
42-if [ -z "$1" ]; then echo "Usage: dssh instance-name" && return 1; fi
43-INSTANCE_DETAILS=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=$1" --output text --query 'Reservations[0].Instances[0].[InstanceId,Placement.AvailabilityZone]')
44-if [ $? -ne 0 ] ; then echo "Failed to describe instances. Check you are logged into AWS with MFA." && return 1; fi
45-if [ "$INSTANCE_DETAILS" = "None" ] ; then echo "Cannot find instance $1. Check you are logged in to the correct AWS account and the instance exists." && return 1; fi
46-aws ec2-instance-connect send-ssh-public-key \
47---instance-id $(echo "$INSTANCE_DETAILS" | awk '{print $1}') \
48---availability-zone $(echo "$INSTANCE_DETAILS" | awk '{print $2}') \
49---instance-os-user "$SSH_USER" \
50---ssh-public-key "file://$SSH_KEY.pub" \
51-|| (echo "Failed to send public key file://$SSH_KEY.pub to AWS" && return 1)
52-HOST=$1
53-shift 1
54-ssh -i "$SSH_KEY" "$SSH_USER@$HOST" $@
55diff --git a/dot_config/zsh/functions/kind-podman-load b/dot_config/zsh/functions/kind-podman-load
56deleted file mode 100644
57index f82a1167ada465d655f48568b49b25a819220abf..0000000000000000000000000000000000000000
58--- a/dot_config/zsh/functions/kind-podman-load
59+++ /dev/null
60@@ -1,6 +0,0 @@
61-# vim: ft=zsh
62-# Function to load a podman image into a kind cluster
63-
64-podman save -o /tmp/$1.tar $1
65-kind load image-archive /tmp/$1.tar
66-rm /tmp/$1.tar