Skip to content

Instantly share code, notes, and snippets.

@j0057
Created January 29, 2014 07:20
Show Gist options
  • Save j0057/8683282 to your computer and use it in GitHub Desktop.
Save j0057/8683282 to your computer and use it in GitHub Desktop.
builds cinnamon from source
#!/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