-
-
Save zaxebo1/65a8a4e2d16b6977f2b4d88f8db92c1d to your computer and use it in GitHub Desktop.
builds cinnamon from source
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 -ex | |
# build everything or just what's on the command line | |
if [ $# -eq 0 ]; then | |
PKGS="cjs cinnamon-desktop cinnamon-translations cinnamon-session cinnamon-settings-daemon cinnamon-control-center muffin Cinnamon nemo cinnamon-screensaver" | |
else | |
PKGS="$*" | |
fi | |
for x in $PKGS; do | |
# get sources | |
if [ ! -d "$x/.git" ]; then | |
git clone https://github.com/linuxmint/$x.git | |
cd "$x" | |
else | |
cd "$x" | |
git clean -df | |
git checkout -- . | |
git pull | |
fi | |
# install any missing dependencies | |
deps=$(dpkg-checkbuilddeps 2>&1 | sed -e 's/.*: //' | sed 's/ /\n/g' | grep -v '^(' | grep -v ')$' || true) | |
if [ -n "$deps" ]; then | |
apt-get install --yes $deps | |
fi | |
# build package | |
dpkg-buildpackage | |
# install packages | |
cd .. | |
dpkg -i *.deb || apt-get install --fix-broken --yes | |
# clean up packages | |
rm *.deb *.changes *.tar.?z *.dsc | |
# clean up source tree | |
cd $x | |
git clean -df | |
git checkout -- . | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment