reGen2 Linux Release Metatool
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 

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