From 0e927ab4c2948429c71c22200da0e760b766102f Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Wed, 30 Nov 2022 15:57:21 -0500
Subject: linhes-dev: lh_setup_dev.sh: add bash alias

---
 linhes/linhes-dev/PKGBUILD        |  4 ++--
 linhes/linhes-dev/lh_setup_dev.sh | 24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/linhes/linhes-dev/PKGBUILD b/linhes/linhes-dev/PKGBUILD
index ceca506..33a906d 100644
--- a/linhes/linhes-dev/PKGBUILD
+++ b/linhes/linhes-dev/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=linhes-dev
 pkgver=9.0.0
-pkgrel=5
+pkgrel=6
 pkgdesc="Scripts to develop LinHES"
 arch=('x86_64')
 license=('GPL2')
@@ -15,5 +15,5 @@ package() {
 }
 sha256sums=('3a64b4125b56c6f95cc9dc85ce58ebd1c0612b22fb27c3e76d4d9a5570f2d61e'
             'd7afe023b5ba5ebb5e1a12d954651e435584034e5b00c37d9a70d0d6fe20643f'
-            'b5d12503757471be72fa20fb86a0b1563916b4db85048dcd78b49eaade3db989'
+            '081ac1ccb40df0c8aa82cd3841a39aa87ead4ea32c9ac6a76c5a7d7f0d10a80a'
             '86c9ebe77228f7e3cc07cb05f480e5584e0e3cad1b889b63a50821f7323bf449')
diff --git a/linhes/linhes-dev/lh_setup_dev.sh b/linhes/linhes-dev/lh_setup_dev.sh
index df034c5..1d9f783 100755
--- a/linhes/linhes-dev/lh_setup_dev.sh
+++ b/linhes/linhes-dev/lh_setup_dev.sh
@@ -23,6 +23,30 @@ sudo sed -i 's/#SRCDEST=.*/SRCDEST=\/data\/dev\/pkg_repo\/sources/' /etc/makepkg
 sudo sed -i 's/#SRCPKGDEST=.*/SRCPKGDEST=\/data\/dev\/pkg_repo\/src_packages/' /etc/makepkg.conf
 sudo sed -i 's/#PACKAGER=.*/PACKAGER=\"LinHESDEV <LinHESDev\@linhes.org>\"/' /etc/makepkg.conf
 
+echo -e "\n\nAdd aliases to .bashrc..."
+if ! grep -q 'alias ccm=' ~/.bashrc; then
+    echo -e "\nalias ccm='sudo ccm'" >> ~/.bashrc
+fi
+if ! grep -q 'alias cddev=' ~/.bashrc; then
+    echo -e "alias cddev='cd /data/dev/'" >> ~/.bashrc
+fi
+if ! grep -q 'alias cdl=' ~/.bashrc; then
+    echo -e "alias cdl='cd /data/dev/linhes_pkgbuild/linhes'" >> ~/.bashrc
+fi
+if ! grep -q 'alias cdb=' ~/.bashrc; then
+    echo -e "alias cdb='cd /data/dev/linhes_pkgbuild/linhes/linhes-dev/LinHES9_iso'" >> ~/.bashrc
+fi
+
+if ! grep -q 'ssh-agent >' ~/.bashrc; then
+cat >> ~/.bashrc<<END
+if ! pgrep -u "\$USER" ssh-agent > /dev/null; then
+    ssh-agent > "\$XDG_RUNTIME_DIR/ssh-agent.env"
+fi
+if [[ ! -f "\$SSH_AUTH_SOCK" ]]; then
+    source "\$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
+fi
+END
+fi
 
 # clone the git linhes_pkgbuild
 # Checkout the repo. You will need to have been given a dev account on
-- 
cgit v0.12

