summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2022-11-30 20:57:21 (GMT)
committerBritney Fransen <brfransen@gmail.com>2022-11-30 20:57:21 (GMT)
commit0e927ab4c2948429c71c22200da0e760b766102f (patch)
tree56c414faabbdac3520d951470407ea12136b342b
parent0e4bfcabcc8daa9fab502c107dd464d13b99a2e5 (diff)
downloadlinhes_pkgbuild-0e927ab4c2948429c71c22200da0e760b766102f.zip
linhes_pkgbuild-0e927ab4c2948429c71c22200da0e760b766102f.tar.gz
linhes_pkgbuild-0e927ab4c2948429c71c22200da0e760b766102f.tar.bz2
linhes-dev: lh_setup_dev.sh: add bash alias
-rw-r--r--linhes/linhes-dev/PKGBUILD4
-rwxr-xr-xlinhes/linhes-dev/lh_setup_dev.sh24
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