blob: 1d9f7832b78e1b32b0b922642be0e447fb252f5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#!/bin/bash
echo "Creating repo directories..."
sudo mkdir -p /data/dev/
sudo chmod a+w /data/dev/
mkdir -p /data/dev/LH_buildroot
mkdir -p /data/dev/pkg_repo/x86_64/linhes
mkdir -p /data/dev/pkg_repo/x86_64/linhes-testing
mkdir -p /data/dev/pkg_repo/packages
mkdir -p /data/dev/pkg_repo/sources
mkdir -p /data/dev/pkg_repo/src_packages/linhes
mkdir -p /data/dev/pkg_repo/src_packages/linhes-testing
echo -e "\n\nSetup clean-chroot-manager (ccm) and edit ~/.config/clean-chroot-manager.conf"...
sudo ccm l
sed -i 's/CHROOTPATH64=.*/CHROOTPATH64=\"\/data\/dev\/LH_buildroot\"/' ~/.config/clean-chroot-manager.conf
sudo ccm c
echo -e "\n\nChanging setting in /etc/makepkg.conf..."
#sudo sed -i 's/#PKGDEST=.*/PKGDEST=\/data\/dev\/pkg_repo\/packages/' /etc/makepkg.conf
sudo sed -i 's/#SRCDEST=.*/SRCDEST=\/data\/dev\/pkg_repo\/sources/' /etc/makepkg.conf
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
# linhes.org. This involves creating a public ssh key and supplying it to
# one of the linhes.org admins. The key is created using ssh-keygen. The
# resulting public key will be stored in .ssh/id_rsa.pub.
echo -e "\n\nCheckout the repo manually. You will need to be given a dev account on linhes.org. This involves creating a public ssh key and supplying it toone of the linhes.org admins. The key is created using ssh-keygen. The resulting public key will be stored in .ssh/id_rsa.pub."
echo -e "EXAMPLE: \ncd /data/dev\ngit clone git@linhes.org:linhes_pkgbuild\n\n"
|