From 252ac0a5a29e68521bd06923be8831f7a0839ab5 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 2 Jun 2025 08:04:04 +0200 Subject: bash: Remove ugly hacks on ssh setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- .bashrc | 55 ++++++++++++++++--------------------------------------- 1 file changed, 16 insertions(+), 39 deletions(-) (limited to '.bashrc') diff --git a/.bashrc b/.bashrc index fc1daa1..bf21af1 100644 --- a/.bashrc +++ b/.bashrc @@ -113,6 +113,22 @@ export CXX=/usr/bin/g++ # Go things 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. @@ -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" -- cgit v1.2.3