Created
September 7, 2010 16:43
-
-
Save svenstaro/568641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
chrootdir='/var/mychroots' | |
chrootname=('stable32' 'stable64') | |
targetarch=('linux32' 'linux64') | |
packager="Thomas Dziedzic < gostrc at gmail >" | |
makeflags="-j9" | |
mkchrs() { | |
for (( i=0; i<${#chrootname[@]}; i++ )); do | |
${targetarch[$i]} sudo makechrootpkg -c -r ${chrootdir}/${chrootname[$i]} | |
done | |
} | |
upchrs() { | |
for (( i=0; i<${#chrootname[@]}; i++ )); do | |
${targetarch[$i]} sudo mkarchroot -u ${chrootdir}/${chrootname[$i]}/root | |
done | |
} | |
newchrs() { | |
sudo rm -rf ${chrootdir} | |
for (( i=0; i<${#chrootname[@]}; i++ )); do | |
sudo mkdir -p ${chrootdir}/${chrootname[$i]} | |
${targetarch[$i]} sudo mkarchroot ${chrootdir}/${chrootname[$i]}/root base base-devel sudo | |
# needed if adding support for [testing] | |
#sudo ${EDITOR} ${chrootdir}/${chrootname[$i]}/root/etc/pacman.conf | |
sudo echo 'Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch' >> sudo ${chrootdir}/${chrootname[$i]}/root/etc/pacman.d/mirrorlist | |
sudo echo 'Server = ftp://mirrors.kernel.org/archlinux/$repo/os/$arch' >> sudo ${chrootdir}/${chrootname[$i]}/root/etc/pacman.d/mirrorlist | |
sudo sed "s/#PACKAGER=.*/PACKAGER='${packager}'/" -i ${chrootdir}/${chrootname[$i]}/root/etc/makepkg.conf | |
sudo sed "s/#MAKEFLAGS=.*/MAKEFLAGS='${makeflags}'/" -i ${chrootdir}/${chrootname[$i]}/root/etc/makepkg.conf | |
done | |
} | |
alias db-aur='ssh aur.archlinux.org /arch/db-update' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- .makizushi 2010-09-07 18:45:09.260037669 +0200 | |
+++ gistfile1.sh 2010-09-07 18:45:49.658538064 +0200 | |
@@ -6,6 +6,7 @@ | |
targetarch=('linux32' 'linux64') | |
packager="Thomas Dziedzic < gostrc at gmail >" | |
+makeflags="-j9" | |
mkchrs() { | |
for (( i=0; i<${#chrootname[@]}; i++ )); do | |
@@ -33,7 +34,8 @@ | |
sudo echo 'Server = ftp://mirrors.kernel.org/archlinux/$repo/os/$arch' >> sudo ${chrootdir}/${chrootname[$i]}/root/etc/pacman.d/mirrorlist | |
sudo sed "s/#PACKAGER=.*/PACKAGER='${packager}'/" -i ${chrootdir}/${chrootname[$i]}/root/etc/makepkg.conf | |
+ sudo sed "s/#MAKEFLAGS=.*/MAKEFLAGS='${makeflags}'/" -i ${chrootdir}/${chrootname[$i]}/root/etc/makepkg.conf | |
done | |
} | |
-alias db-aur='ssh aur.archlinux.org /arch/db-update' | |
+alias db-aur='ssh aur.archlinux.org /arch/db-update' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment