reGen2 Linux Release Metatool
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

24 rader
831 B

# Copyright 2010-2012, Asio Software Technologies
# Distributed under the terms of the GNU General Public License v3
EZMOD_DESCRIPTION="Synchronizes local Portage mirror"
EZMOD_COMPATIBILITY="ezsync"
EZMOD_AUTHOR="Rafal Kupiec"
EZMOD_VERSION="1.0"
ezsync_postcommit() {
if [ "${LOCALMIRRORPATH}" != "" ]; then
printInfo "Synchronizing local Portage mirror..."
if [ "$(toUpper ${PORTAGE_BUILD[1]})" != "GIT" ]; then
printWarn "Local mirror actually supports only GIT!"
return 0
fi
if [ -d ${LOCALMIRRORPATH} ]; then
cd ${LOCALMIRRORPATH}
run "su ${LOCALMIRRORUSER} -s \"/bin/sh\" -c \"git fetch --all\"" || return 1
else
makeDirectory ${LOCALMIRRORPATH}
run "su ${LOCALMIRRORUSER} -s \"/bin/sh\" -c \"git clone --mirror --bare ${PORTAGE_BUILD[2]} ${LOCALMIRRORPATH}\"" || return 1
fi
fi
return 0
}