mirror of
https://github.com/macports/mpbb.git
synced 2026-07-12 18:18:44 -07:00
mpab: restrict svn checkout to base and dports, and look at BASE_UPDATE env var that specifies how to update the base install
git-svn-id: https://svn.macports.org/repository/macports/contrib/mpab@80242 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# selfupdate MacPorts in the chroot
|
||||
#
|
||||
|
||||
if [[ -z "$PREFIX" ]]; then
|
||||
PREFIX=/opt/local
|
||||
fi
|
||||
|
||||
${PREFIX}/bin/port selfupdate
|
||||
+4
-2
@@ -1,5 +1,7 @@
|
||||
#/bin/sh
|
||||
svn checkout -r HEAD https://svn.macports.org/repository/macports/trunk mpexport
|
||||
#!/bin/sh
|
||||
mkdir -p mpexport
|
||||
svn checkout --non-interactive -r HEAD https://svn.macports.org/repository/macports/trunk/base mpexport/base
|
||||
svn checkout --non-interactive -r HEAD https://svn.macports.org/repository/macports/trunk/dports mpexport/dports
|
||||
cd mpexport
|
||||
tar c --exclude '.svn' -f - . | bzip2 -c > ../macports_dist.tar.bz2
|
||||
cd ..
|
||||
|
||||
@@ -45,12 +45,18 @@ function chroot_exec () {
|
||||
|
||||
if [[ -d ${dataDir}/${exportDir} ]] ; then
|
||||
svn update --non-interactive \
|
||||
-r HEAD ${dataDir}/${exportDir}/* || exit 1
|
||||
-r HEAD ${dataDir}/${exportDir}/base || exit 1
|
||||
svn update --non-interactive \
|
||||
-r HEAD ${dataDir}/${exportDir}/dports || exit 1
|
||||
else
|
||||
echo "Checking out macports from svn..."
|
||||
mkdir -p ${dataDir}/${exportDir}
|
||||
svn checkout --non-interactive -r HEAD \
|
||||
https://svn.macports.org/repository/macports/trunk \
|
||||
${dataDir}/${exportDir} || exit 1
|
||||
https://svn.macports.org/repository/macports/trunk/base \
|
||||
${dataDir}/${exportDir}/base || exit 1
|
||||
svn checkout --non-interactive -r HEAD \
|
||||
https://svn.macports.org/repository/macports/trunk/dports \
|
||||
${dataDir}/${exportDir}/dports || exit 1
|
||||
fi
|
||||
|
||||
if [[ -n "$chrootPath" && ! -d "$chrootPath" ]] ; then
|
||||
@@ -65,6 +71,12 @@ rsync -av --del --exclude '*~' --exclude '.svn' --exclude '/dports/PortIndex*' \
|
||||
echo "Re-creating portindex"
|
||||
chroot_exec recreateportindex
|
||||
|
||||
if [[ "$BASE_UPDATE" == "selfupdate" ]]; then
|
||||
chroot_exec selfupdate
|
||||
elif [[ "$BASE_UPDATE" == "svn" ]]; then
|
||||
chroot_exec installmacports
|
||||
fi
|
||||
|
||||
if [[ "${umount}" = yes ]] ; then
|
||||
sudo ${baseDir}/mpab umount || exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user