summaryrefslogtreecommitdiffstats
path: root/scripts/update-zfs.sh
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-12-11 16:15:33 -0800
committerBrian Behlendorf <[email protected]>2009-12-11 16:15:33 -0800
commit058ac9ba7811baea78a47ba1ead8acd7512684b6 (patch)
tree5c6c09ee995c3a6cdac7aefd0987620089deba88 /scripts/update-zfs.sh
parent0aa61e8427c63e835d9159d3b497591b0691dfe8 (diff)
Pull in latest man pages as part of update-zfs.sh
The script has been updated to download the latest documentations packages for Solaris and extract the needed ZFS man pages. These will still need a little markup to handle changes between the Solaris and Linux versions of ZFS. Howver, they should be pretty minor I've tried hard to keep the interface the same. In additional to the script update the zdb, zfs, and zpool man pages have been added to the repo.
Diffstat (limited to 'scripts/update-zfs.sh')
-rwxr-xr-xscripts/update-zfs.sh30
1 files changed, 27 insertions, 3 deletions
diff --git a/scripts/update-zfs.sh b/scripts/update-zfs.sh
index abb35bc80..03023eaef 100755
--- a/scripts/update-zfs.sh
+++ b/scripts/update-zfs.sh
@@ -9,6 +9,8 @@ trap die_int INT
RELEASE=$1
PROG=update-zfs.sh
+REMOTE_DOC_FILE=man-sunosman-20090930.tar.bz2
+REMOTE_DOC=http://dlc.sun.com/osol/man/downloads/current/${REMOTE_DOC_FILE}
REMOTE_SRC=http://dlc.sun.com/osol/on/downloads/${RELEASE}/on-src.tar.bz2
die() {
@@ -26,36 +28,51 @@ if [ `basename $DST` != "scripts" ]; then
die "Must be run from scripts directory"
fi
+if [ ! "$RELEASE" ]; then
+ die "Must specify ZFS release build"
+fi
+
SRC=`mktemp -d /tmp/os-${RELEASE}.XXXXXXXXXX`
DST=`dirname $DST`
-echo "----------------------------------------------------------------------"
+echo "----------------------------------------------------------------"
echo "Remote Source: ${REMOTE_SRC}"
+echo "Remote Docs: ${REMOTE_DOC}"
echo "Local Source: ${SRC}"
echo "Local Dest: ${DST}"
echo
echo "------------- Fetching OpenSolaris ${RELEASE} archive ----------------"
-wget ${REMOTE_SRC} -P ${SRC} ||
+wget -q ${REMOTE_SRC} -P ${SRC} ||
die "Error 'wget ${REMOTE_SRC}'"
+echo "------------- Fetching OpenSolaris documentation ---------------"
+wget -q ${REMOTE_DOC} -P ${SRC} ||
+ die "Error 'wget ${REMOTE_DOC}'"
+
echo "------------- Unpacking OpenSolaris ${RELEASE} archive ---------------"
tar -xjf ${SRC}/on-src.tar.bz2 -C ${SRC} ||
die "Error 'tar -xjf ${SRC}/on-src.tar.bz2 -C ${SRC}'"
+echo "------------- Unpacking OpenSolaris documentation --------------"
+tar -xjf ${SRC}/${REMOTE_DOC_FILE} -C ${SRC} ||
+ die "Error 'tar -xjf ${SRC}/${REMOTE_DOC_FILE} -C ${SRC}'"
+
SRC_LIB=${SRC}/usr/src/lib
SRC_CMD=${SRC}/usr/src/cmd
SRC_CM=${SRC}/usr/src/common
SRC_UTS=${SRC}/usr/src/uts
SRC_UCM=${SRC}/usr/src/uts/common
SRC_ZLIB=${SRC}/usr/src/uts/common/fs/zfs
+SRC_MAN=${SRC}/man
DST_MOD=${DST}/module
DST_LIB=${DST}/lib
DST_CMD=${DST}/cmd
+DST_MAN=${DST}/man
+umask 022
rm -Rf ${DST}/zfs
-echo
echo "------------- Updating ZFS from OpenSolaris ${RELEASE} ---------------"
echo "* module/avl"
mkdir -p ${DST_MOD}/avl/include/sys/
@@ -150,6 +167,13 @@ echo "* cmd/ztest"
mkdir -p ${DST_CMD}/ztest
cp ${SRC_CMD}/ztest/*.c ${DST_CMD}/ztest/
+echo "* man/"
+mkdir -p ${DST_MAN}/man8
+cp ${SRC_MAN}/man1m/zfs.1m ${DST_MAN}/man8/zfs.8
+cp ${SRC_MAN}/man1m/zpool.1m ${DST_MAN}/man8/zpool.8
+cp ${SRC_MAN}/man1m/zdb.1m ${DST_MAN}/man8/zdb.8
+chmod -R 644 ${DST_MAN}/man8/*
+
echo "${REMOTE_SRC}" >${DST}/ZFS.RELEASE
rm -Rf ${SRC}