aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-06-02 08:04:04 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-06-02 08:04:04 +0200
commit252ac0a5a29e68521bd06923be8831f7a0839ab5 (patch)
treea4477801303a1b307ea147465165b27d6aeb42df
parent5cac016aa8ad47f69152fd20b1d671652e7988b1 (diff)
downloaddotfiles-252ac0a5a29e68521bd06923be8831f7a0839ab5.tar.gz
dotfiles-252ac0a5a29e68521bd06923be8831f7a0839ab5.zip
bash: Remove ugly hacks on ssh setup
In the end they were not needed and brought more problems than they tried to solve. Moreover, doing this left the RISC-V thingies in a weird section, so that configuration has been moved up. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
-rw-r--r--.bashrc55
1 files changed, 16 insertions, 39 deletions
diff --git a/.bashrc b/.bashrc
index fc1daa1..bf21af1 100644
--- a/.bashrc
+++ b/.bashrc
@@ -114,6 +114,22 @@ export CXX=/usr/bin/g++
export GOPATH=$HOME
##
+# RISC-V
+
+# Setting this value as expected by the Linux Kernel when building it.
+export ARCH=riscv
+
+# If this is not a RISC-V machine, set up cross compilation for it.
+if [ "$(uname -m)" != "riscv64" ]; then
+ export CROSS_COMPILE=riscv64-suse-linux-
+fi
+
+# Local builds for busybox and the Linux kernel. Needed by scripts like
+# `bin/run-riscv-qemu.sh`.
+export BUSYBOX_SRC="$HOME/src/busybox/1.36.1"
+export QEMU_KERNEL="$HOME/src/git.kernel.org/linux/kernel/riscv/arch/riscv/boot/Image"
+
+##
# Misc.
# The g utility. See: https://github.com/mssola/g
@@ -157,45 +173,6 @@ video2gif() {
rm "${1}.png"
}
-##
-# RISC-V
-
-# Setting this value as expected by the Linux Kernel when building it.
-export ARCH=riscv
-
-# If this is not a RISC-V machine, set up cross compilation for it.
-if [ "$(uname -m)" != "riscv64" ]; then
- export CROSS_COMPILE=riscv64-suse-linux-
-fi
-
-# Local builds for busybox and the Linux kernel. Needed by scripts like
-# `bin/run-riscv-qemu.sh`.
-export BUSYBOX_SRC="$HOME/src/busybox/1.36.1"
-export QEMU_KERNEL="$HOME/src/git.kernel.org/linux/kernel/riscv/arch/riscv/boot/Image"
-
-##
-# Lastly I had some problems with the GPG agent recently. So I copied a solution
-# from https://github.com/jessfraz/dotfiles
-
-# Use a tty for gpg
-GPG_TTY=$(tty)
-export GPG_TTY
-
-# Start the gpg-agent if not already running
-if ! pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1; then
- gpg-connect-agent /bye >/dev/null 2>&1
- gpg-connect-agent updatestartuptty /bye >/dev/null
-fi
-
-# Set SSH to use gpg-agent
-unset SSH_AGENT_PID
-if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
- export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
-fi
-
-# Add alias for ssh to update the tty
-alias ssh="gpg-connect-agent updatestartuptty /bye >/dev/null; ssh"
-
# Handy alias for the ip command
alias ip="ip --color"