reGen2 Linux Release Metatool
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 

24 rindas
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
}