#!/bin/sh there="$(pwd)" cd "$(dirname "$0")" here="$(pwd)" cd "$there" overlay="$(readlink -f "$here/../../")" echo "Updating use flag cache for overlay $overlay ..." egencache --update-use-local-desc --repo=arx-libertatis egencache --update --repo=arx-libertatis git add "$overlay/metadata/cache" git add "$overlay/profiles/use.local.desc" esc=`echo -e '\033'` # Prevent commit if there untracked files that are not in .gitignore untracked=`git status -u | grep '^# Untracked files:$'` if [ "$untracked" != "" ] ; then git status ; echo "${esc}[31;1mAdd untracked files first!${esc}[0m" ; exit 1 fi