Created
May 14, 2012 16:07
-
-
Save anonymous/2694780 to your computer and use it in GitHub Desktop.
unity-builder.sh
This file contains 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 | |
# Dirty script to build Unity under ArchLinux | |
# Thanks for PKGBUILDs, chenxiaolong! | |
# Valdos Sine <fat0troll at riseup dot net> 2012 | |
echo "Run it in directory which will be build root ;)" | |
echo "Make sure you're have sudo without password or you will stuck in every package installation" | |
echo "GO!" | |
# Checking main repo... | |
if [ -d Unity-for-Arch ] ; then | |
echo "All OK" | |
cd Unity-for-Arch/ | |
git pull | |
cd - | |
else | |
echo "There is no PKGBUILD main repo, checking..." | |
git clone https://github.com/chenxiaolong/Unity-for-Arch.git | |
fi | |
# Checking extra repo... | |
if [ -d Unity-for-Arch-Extra ] ; then | |
echo "All EXTRA OK" | |
cd Unity-for-Arch-Extra/ | |
git pull | |
cd - | |
else | |
echo "There is no PKGBUILD extra repo, checking..." | |
git clone https://github.com/chenxiaolong/Unity-for-Arch-Extra.git | |
fi | |
build_main() | |
{ | |
cd Unity-for-Arch/ | |
MAINPKGS=`cat README | grep [0-9]: | grep -v '*' | cut -d ' ' -f 2` | |
# Yes, I have removed optional packages. You can build they by adding it in next option | |
MAINPKGS+=" overlay-scrollbar" | |
for i in $MAINPKGS ; do | |
cd $i | |
yes | makepkg -si | |
cd ../ | |
done | |
cd ../ | |
} | |
build_extra() | |
{ | |
cd Unity-for-Arch-Extra/ | |
# There is hardcoded array, just because README in this git is outdated ;-( | |
EXTRAPKGS="humanity-icon-theme ubuntu-mono ubuntu-wallpapers light-themes ubuntu-sounds lightdm-ubuntu accountsservice-ubuntu lightdm-unity-greeter python-defer ubuntu-tweak" | |
for j in $EXTRAPKGS ; do | |
cd $j | |
yes | makepkg -si | |
cd ../ | |
done | |
cd ../ | |
} | |
repo() | |
{ | |
ARCH=`uname -m` | |
if [ -d unity/os/$ARCH ] ; then | |
echo "Repo dir exist, OK!" | |
else | |
echo "Creating repo dir..." | |
mkdir -p unity/os/$ARCH | |
fi | |
find Unity-for-Arch* -name *.pkg.tar.xz -exec cp '{}' unity/os/$ARCH/ \; | |
cd unity/os/$ARCH/ | |
repo-add ./unity.db.tar.gz ./*.pkg.tar.xz | |
cd ../../../ | |
} | |
build_main | |
build_extra | |
repo | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment