[csw-devel] SF.net SVN: opencsw:[308] utilities/mk_struct.sh

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Feb 21 12:00:51 CET 2011


Revision: 308
          http://opencsw.svn.sourceforge.net/opencsw/?rev=308&view=rev
Author:   wahwah
Date:     2011-02-21 11:00:50 +0000 (Mon, 21 Feb 2011)

Log Message:
-----------
mk_struct.sh: A script which creates a template opencsw mirror directory structure.

Added Paths:
-----------
    utilities/mk_struct.sh

Added: utilities/mk_struct.sh
===================================================================
--- utilities/mk_struct.sh	                        (rev 0)
+++ utilities/mk_struct.sh	2011-02-21 11:00:50 UTC (rev 308)
@@ -0,0 +1,66 @@
+#!/bin/bash
+# $Id$
+#
+# This script creates a template directory structure of opencsw mirror.
+
+set -u
+set -e
+
+tiers=( core active unsupported )
+released=( legacy )
+named_rels=( paris dublin legacy )
+
+function c_tiers {
+  for tier in "${tiers[@]}"
+  do
+    mkdir -p "${tier}"
+  done
+}
+
+declare -r BASEDIR="opencsw"
+
+rm -rf "${BASEDIR}"
+mkdir -p "${BASEDIR}"
+pushd "${BASEDIR}"
+
+mkdir -p dists
+pushd dists
+
+for namedrel in "${named_rels[@]}"
+do
+  mkdir -p "${namedrel}"
+  pushd "${namedrel}"
+  c_tiers
+  popd
+done
+popd # dists
+
+mkdir -p "releases"
+pushd "releases"
+for rel in "${released[@]}"
+do
+  ln -s ../dists/${rel} ${rel}
+done
+popd # releases
+
+# The compat directory contains core+active+unsupported squashed together, so
+# that pkg-get users can get them.
+mkdir -p compat
+pushd "compat"
+for namedrel in "${named_rels[@]}"
+do
+  mkdir -p "${namedrel}"
+done
+popd # compat
+
+# This intentionally breaks backward compatibility.  pkg-get users need to
+# start subscribing to the compat subtree.  pkgutil users can start
+# subscribing to specific core/active/unsupported catalogs.
+ln -s releases/legacy stable
+ln -s dists/dublin unstable
+ln -s dists/paris testing
+
+popd # opencsw
+
+clear
+tree "${BASEDIR}" | less


Property changes on: utilities/mk_struct.sh
___________________________________________________________________
Added: svn:keywords
   + Id


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list