Created
September 25, 2011 16:26
-
-
Save Enlik/1240794 to your computer and use it in GitHub Desktop.
idea of a helper script for Sabayon overlay splitting
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 | |
# What to remove from sabayon-distro overlay? | |
# Stuff useful for Gentoo users listed here. | |
# Remove Sabayon modified ebuilds from this list. | |
# <slawomir.nizio at sabayon.org> | |
what=( | |
app-admin | |
# etc | |
x11-plugins | |
x11-themes/cairo-dock-themes | |
x11-themes/equinox-themes | |
x11-wm | |
) | |
# Usage of "${what[*]}" is correct here. | |
_echo_exec() { echo -n "execute: "; printf '[%s]' "$@"; echo; } | |
_echo_exec git filter-branch --prune-empty --index-filter "git rm --cached --ignore-unmatch -r ${what[*]}" HEAD | |
echo press enter if ok | |
read x | |
git filter-branch --prune-empty --index-filter "git rm --cached --ignore-unmatch -r ${what[*]}" HEAD | |
echo cleanup, rm ref? press enter twice if ok | |
read x | |
read x | |
set -x | |
git remote rm origin | |
git update-ref -d refs/original/refs/heads/master | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
set +x | |
echo end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment