Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (9e4828438e910a2457a762e0e3d1e0d45c4c75d8)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (9e4828438e910a2457a762e0e3d1e0d45c4c75d8)
  • Date: Mon, 13 Oct 2008 21:45:11 -0500

GIT changes to test cauldron by Justin Boffemmyer <flux AT sourcemage.org>:

scripts/add-sauce.sh | 28 ++++++++++++++++++++++------
scripts/cauldronchr.sh | 28 ++++++++++++++++++++++++++--
scripts/cleaniso.sh | 29 ++++++++++++++++++-----------
scripts/mkiso.sh | 34 ++++++++++++++++++++++++++++++++--
scripts/mkrelease.sh | 43 ++++++++++++++++++++++++++++++++++++-------
scripts/mksystem.sh | 30 +++++++++++++++++++++++-------
6 files changed, 157 insertions(+), 35 deletions(-)

New commits:
commit 9e4828438e910a2457a762e0e3d1e0d45c4c75d8
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/mksystem.sh: unify opts & usage info

The usage info is being unified across all of the cauldron scripts.
This includes unifying the options a little as well. The
options/arguments may be unified further, so this is not necessarily
final.

commit 2b67af6fbe21917ac87c85ce79e891883df3f487
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/mkrelease.sh: unify opts & usage info

The usage info is being unified across all of the cauldron scripts.
This includes unifying the options a little as well. The
options/arguments may be unified further, so this is not necessarily
final.

commit bd0365214f61a8bbe554e27133c3a0d3e2af172f
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/mkiso.sh: unify opts & usage info

The usage info is being unified across all of the cauldron scripts.
This includes unifying the options a little as well. The
options/arguments may be unified further, so this is not necessarily
final.

commit ea315235f9364a03053bfb1d4a5e2bd92a75f33a
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/cleaniso.sh: unify opts & usage info

The usage info is being unified across all of the cauldron scripts.
This includes unifying the options a little as well. The
options/arguments may be unified further, so this is not necessarily
final.

commit 42447f4b251a7ae3f373fd9faddfa689690e95fb
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/cauldronchr.sh: unify opts & usage info

The usage info is being unified across all of the cauldron scripts.
This includes unifying the options a little as well. The
options/arguments may be unified further, so this is not necessarily
final.

commit 7791d39a144ea66655b5748e46e7d23eeb85b4e4
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/add-sauce.sh: unify opts & usage info

The usage info is being unified across all of the cauldron scripts.
This includes unifying the options a little as well. The
options/arguments may be unified further, so this is not necessarily
final.

diff --git a/scripts/add-sauce.sh b/scripts/add-sauce.sh
index 57e7ff2..feb1e38 100755
--- a/scripts/add-sauce.sh
+++ b/scripts/add-sauce.sh
@@ -7,23 +7,39 @@ TYPE="bad"

function usage() {
cat << EndUsage
-Usage: $0 [-f] -i|-s /path/to/target
-Adds the cauldron team files to the given chroot
-Use -i for an iso target, -s for the system tarball
+Usage: $(basename $0) [-ofh] -i|-s /path/to/target
+
+Adds the cauldron team files to the given chroot.
+This script requires superuser privileges.
+
+Required:
+ -i Use for "iso" targets
+
+ -s Use for "system" targets
+
+Options:
+ -f Forces the script to add the files to the target directory, even
if
+ that directory is not detected to be a proper chroot environment.
+
+ -o Forces overwriting files in the target directory
+
+ -h Shows this help information
EndUsage
exit 1
} >&2

-while getopts ":fis" Option
+while getopts ":fhios" Option
do
case $Option in
f ) FORCE=true ;;
i ) TYPE="iso" ;;
+ o ) OVERWRITE="a" ;;
s ) TYPE="system" ;;
- * ) usage ;;
+ h ) usage ;;
+ * ) echo "Unrecognized option." >&2 && usage ;;
esac
done
-shift $((OPTIND - 1))
+shift $(($OPTIND - 1))

if [[ $TYPE == "bad" || -z $1 ]] ;then
usage
diff --git a/scripts/cauldronchr.sh b/scripts/cauldronchr.sh
index b519507..7bde1c6 100755
--- a/scripts/cauldronchr.sh
+++ b/scripts/cauldronchr.sh
@@ -14,12 +14,36 @@ SELF=$0
CHROOT_DIR=
CHROOT_CMD=

+function usage() {
+ cat << EndUsage
+Usage: $(basename $0) [-h] [-d /path/to/target] [CHROOT_CMD]
+Chroots to target with mounts taken care of (proc, dev, etc.).
+This script requires superuser privileges.
+
+Options:
+ -d /path/to/target
+ The target directory you would like to chroot to. Defaults to
+ current working directory.
+
+ -h Shows this help information
+
+ CHROOT_CMD
+ Any arbitrary command you wish to run inside the chroot. Note that
+ you must specify an absolute path or the command will not likely
be
+ found (a way around this would be to either set the path as part
of
+ the command to execute, or to set the command to be /bin/bash -l
+ some_command_without_abs_path). Defaults to "/bin/bash -l".
+EndUsage
+ exit 1
+} >&2
+
# dir to chroot to is either $1 or $CWD
-while getopts ":d:" Option
+while getopts ":d:h" Option
do
case $Option in
d ) CHROOT_DIR="$OPTARG" ;;
- * ) ;;
+ h ) usage ;;
+ * ) echo "Unrecognized option." >&2 && usage ;;
esac
done
shift $(($OPTIND - 1))
diff --git a/scripts/cleaniso.sh b/scripts/cleaniso.sh
index 9d63760..3c10948 100755
--- a/scripts/cleaniso.sh
+++ b/scripts/cleaniso.sh
@@ -6,26 +6,33 @@ CLEANALL=false
CLEANERS="$(dirname $0)/../data/cleaners"

function usage() {
- cat <<-USAGE
- Usage: $0 [-a] iso_chroot cleaner(s)
+ cat <<EndUsage
+Usage: $(basename $0) [-a] iso_chroot cleaner(s)

- For each cleaner specified as an argument, cleans the
- files and directories listed therein from iso_chroot.
- A cleaner is the ouput of 'gaze install \$SPELL' minus
- whatever you don't want removed. If -a is specified,
- it will use all cleaners found in the cauldron cleaner dir.
- USAGE
+For each cleaner specified as an argument, cleans the files and
+directories listed therein from iso_chroot. A cleaner is the ouput of
+'gaze install \$SPELL' minus whatever you don't want removed. This
+script requires superuser privileges.
+
+Options:
+ -a Run on all cleaner files in the cauldron cleaner
+ directory. If this option is specified, any arguments
+ provided beyond iso_chroot are ignored.
+
+ -h Shows this help information
+EndUsage
exit 1
} >&2

-while getopts ":a" Option
+while getopts ":ah" Option
do
case $Option in
a ) CLEANALL=true ;;
- * ) ;;
+ h ) usage ;;
+ * ) echo "Unrecognized option." >&2 && usage ;;
esac
done
-shift $((OPTIND - 1))
+shift $(($OPTIND - 1))

# Check to make sure we have the right number of arguments
# taking the option flag into account
diff --git a/scripts/mkiso.sh b/scripts/mkiso.sh
index 40760ee..6b1d8f3 100755
--- a/scripts/mkiso.sh
+++ b/scripts/mkiso.sh
@@ -3,11 +3,41 @@
COMPRESS="no"
KEEP=

+function usage() {
+ cat << EndUsage
+Usage: $(basename $0) [-hu] /path/to/target ISO_VERSION
+
+Generates a bootable iso9660 iso file using /path/to/target. The output file
is
+named ISO_VERSION. Also creates metadata information appropriate to the iso
+(publisher, preparer, volume_id, etc.). Uses ISO_VERSION for the volume_id
+field. This script requires superuser privileges.
+
+Required:
+ /path/to/target
+ The target directory you would like to chroot to. Defaults to
+ current working directory.
+
+ ISO_VERSION
+ A string that specifies the filename of the iso output file.
+ you must specify an absolute path or the command will not likely
be
+ found (a way around this would be to either set the path as part
of
+ the command to execute, or to set the command to be /bin/bash -l
+ some_command_without_abs_path). Defaults to "/bin/bash -l".
+Options:
+ -u Change ownership of output files to $UID:$GID
+
+ -h Shows this help information
+EndUsage
+ exit 1
+} >&2
+
while getopts "z" Options
do
case $Options in
- "z") COMPRESS="yes"
- "k") KEEP="-k"
+ k ) KEEP="-k" ;;
+ z ) COMPRESS=true ;;
+ h ) usage ;;
+ * ) echo "Unrecognized option" >&2 && usage ;;
esac
done
shift $(($OPTIND - 1))
diff --git a/scripts/mkrelease.sh b/scripts/mkrelease.sh
index a69b9c6..38bcc35 100755
--- a/scripts/mkrelease.sh
+++ b/scripts/mkrelease.sh
@@ -3,17 +3,46 @@
TARGET=$1
VERSION=$2

+function usage() {
+ cat << EndUsage
+Usage: $(basename $0) [-h] /path/to/target VERSION
+
+Creates an official release ISO from /path/to/target for the ISO
+version specified as VERSION. This script requires superuser
+privileges.
+
+Required:
+ /path/to/target
+ The target directory you would like to make a releasable
+ ISO from.
+
+ VERSION
+ A string which describes the version of the ISO to
+ release. Since this script is for making official
+ releases, the string will be prepended with smgl-,
+ resulting in smgl-VERSION.iso for the final ISO output.
+
+Options:
+ -u chown output files to $UID:$GID
+
+ -h Shows this help information
+EndUsage
+ exit 1
+} >&2
+
+while getopts ":h" Option
+do
+ case $Option in
+ h ) usage ;;
+ * ) echo "Unrecognized option." >&2 && usage ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
[[ $# -lt 2 ]] && usage

GRIMOIRE_VER=$(< "$TARGET"/var/lib/sorcery/codex/stable/VERSION)

-function usage() {
-cat << EOF
-Usage: $(basename $0) /path/to/iso/chroot VERSION
-EOF
-exit
-}
-
for file in $(grep -qr '@ISO_VERSION@'
$TARGET/{etc,isolinux,usr/share/doc/smgl.install}/*)
do
sed -i "s/@ISO_VERSION@/$VERSION/" "$file"
diff --git a/scripts/mksystem.sh b/scripts/mksystem.sh
index c0c9cc1..6e267b2 100755
--- a/scripts/mksystem.sh
+++ b/scripts/mksystem.sh
@@ -1,10 +1,32 @@
#!/bin/bash

+function usage() {
+ cat << EndUsage
+Usage: $(basename $0) -d /path/to/target /path/to/output
+Generates a compressed tarball of the "system" directory specified in
+/path/to/target. This script requires superuser privileges.
+
+Required:
+ /path/to/target
+ The path to the "system" directory.
+
+ /path/to/output
+ The path to the desired output file.
+
+Options:
+ -v if specified, tar progress is output to STDOUT
+
+ -h Shows this help information
+EndUsage
+ exit 1
+} >&2
+
while getopts ":v" Option
do
case $Option in
v ) VERBOSE="-v" ;;
- * ) ;;
+ h ) usage ;;
+ * ) echo "Unrecognized option." >&2 && usage ;;
esac
done
shift $(($OPTIND - 1))
@@ -15,12 +37,6 @@ SYSTAR="${2:-$(basename $SYSDIR).tar.bz2}"
[[ $(dirname $SYSDIR) == '.' ]] && SYSDIR="$PWD/$SYSDIR"
[[ $(dirname $SYSTAR) == '.' ]] && SYSTAR="$PWD/$SYSTAR"

-function usage() {
- echo ""
- echo "usage: mksystem /path/to/system/dir OUTPUT_FILE"
- echo "where OUTPUT_FILE is specified via an absolute path"
- exit 1
-}

[[ -z $SYSDIR ]] && usage




  • [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (9e4828438e910a2457a762e0e3d1e0d45c4c75d8), Justin Boffemmyer, 10/13/2008

Archive powered by MHonArc 2.6.24.

Top of Page