From 610b3fe35b555fc26b410e6c9639bb6b8bdc5909 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Nov 2005 13:00:18 +0100 Subject: [PATCH 1/7] Initial commit --- README | 1 + update-git+cogito.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 README create mode 100755 update-git+cogito.sh diff --git a/README b/README new file mode 100644 index 0000000..1fbb365 --- /dev/null +++ b/README @@ -0,0 +1 @@ +Miscellaneous scripts used for development diff --git a/update-git+cogito.sh b/update-git+cogito.sh new file mode 100755 index 0000000..318b06d --- /dev/null +++ b/update-git+cogito.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# Nico Schottelius +# Date: Mit Nov 9 12:57:04 CET 2005 +# Last Modified: - +# +# Install latest git and cogito to $INSTALL_PREFIX/$name and +# link the binaries to $BINDIR +# Needs git and cogito to work! + +BASE_GET=http://www.kernel.org/pub/scm/ +PROJECTS="git/git.git cogito/cogito.git" +BUILDDIR=/home/nico/build +INSTALL_PREFIX=/usr/packages +BINDIR=/usr/local/bin + +for project in $PROJECTS; do + realname=$(echo $project | sed -e 's,.*/,,' -e 's/\.git$//') + + echo "Working on $realname (in $BUILDDIR/$realname) ... " + + if [ ! -d "$BUILDDIR/$realname" ]; then + echo "Cloning $realname" + cg-clone "${BASE_GET}${project}" "$BUILDDIR/$realname" + else + echo "Updating $realname from \"origin\"" + cd "$BUILDDIR/$realname" || exit 1 + cg-update origin + fi + + cd "$BUILDDIR/$realname" + version=$(cg-object-id) + echo "Installing $realname (Version: $version)" + DDIR=$INSTALL_PREFIX/$realname-$version + make "prefix=$DDIR" all + make "prefix=$DDIR" install + + echo "Linking files to $BINDIR ..." + for file in "$DDIR/bin/"*; do + ln -sf $file "$BINDIR" + done +done From 776d37c241ca3d7548ed7563e2f61fbfc27a70d1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Nov 2005 12:54:53 +0100 Subject: [PATCH 2/7] Adding new-old files. --- build-autoconf.sh | 13 +++++++++++++ build-make+prefix.sh | 13 +++++++++++++ compile.package | 14 ++++++++++++++ 3 files changed, 40 insertions(+) create mode 100755 build-autoconf.sh create mode 100755 build-make+prefix.sh create mode 100644 compile.package diff --git a/build-autoconf.sh b/build-autoconf.sh new file mode 100755 index 0000000..e5ed06e --- /dev/null +++ b/build-autoconf.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 17-Sep-2005 +# Last Modified: - +# + +[ $# -eq 1 ] || exit 23 + +PACKAGE=$1; shift +PREFIX=/usr/packages/$PACKAGE + +./configure --prefix=$PREfIX $@ && make diff --git a/build-make+prefix.sh b/build-make+prefix.sh new file mode 100755 index 0000000..51b22f2 --- /dev/null +++ b/build-make+prefix.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 17-Sep-2005 +# Last Modified: - +# + +[ $# -eq 1 ] || exit 23 + +PACKAGE=$1; shift +PREFIX=/usr/packages/$PACKAGE + +make prefix=$PREFIX diff --git a/compile.package b/compile.package new file mode 100644 index 0000000..a292309 --- /dev/null +++ b/compile.package @@ -0,0 +1,14 @@ +#!/bin/sh +# cLinux +# Nico Schottelius (nico-linux@schottelius.org) +# 2005-03-27 +# build a standard package + +[ $# -ne 1 ] && exit 1 + +PRE_PREFIX=/usr/packages +PKGDL=$1 + +PREFIX=${PRE_PREFIX}/${PKGDL} + +./configure "--prefix=${PREFIX}" From a1ad5cd34497c0cd870c138039eda15dd6fea02f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Nov 2005 12:55:32 +0100 Subject: [PATCH 3/7] Added cleaning up and exiting on error --- update-git+cogito.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/update-git+cogito.sh b/update-git+cogito.sh index 318b06d..86f24af 100755 --- a/update-git+cogito.sh +++ b/update-git+cogito.sh @@ -1,7 +1,7 @@ #!/bin/sh # Nico Schottelius # Date: Mit Nov 9 12:57:04 CET 2005 -# Last Modified: - +# Last Modified: Thu Nov 10 12:53:00 CET 2005 # # Install latest git and cogito to $INSTALL_PREFIX/$name and # link the binaries to $BINDIR @@ -13,6 +13,13 @@ BUILDDIR=/home/nico/build INSTALL_PREFIX=/usr/packages BINDIR=/usr/local/bin +error_in() +{ + echo "[failed] $1" + echo "Exiting now." + exit 1 +} + for project in $PROJECTS; do realname=$(echo $project | sed -e 's,.*/,,' -e 's/\.git$//') @@ -23,7 +30,7 @@ for project in $PROJECTS; do cg-clone "${BASE_GET}${project}" "$BUILDDIR/$realname" else echo "Updating $realname from \"origin\"" - cd "$BUILDDIR/$realname" || exit 1 + cd "$BUILDDIR/$realname" || error_in "$BUILDDIR/$realname" cg-update origin fi @@ -31,11 +38,12 @@ for project in $PROJECTS; do version=$(cg-object-id) echo "Installing $realname (Version: $version)" DDIR=$INSTALL_PREFIX/$realname-$version - make "prefix=$DDIR" all - make "prefix=$DDIR" install + make clean || error_in "Cleaning $realname" + make "prefix=$DDIR" all || error_in "Building $realname" + make "prefix=$DDIR" install || error_in "Installing $realname" echo "Linking files to $BINDIR ..." for file in "$DDIR/bin/"*; do - ln -sf $file "$BINDIR" + ln -sf $file "$BINDIR" || error_in "Linking $file" done done From 0f0a48ab3cc4ca0e478e2c8c369d3d541487fedf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 7 Dec 2005 15:47:35 +0100 Subject: [PATCH 4/7] Added sanity check, exit if pull or clone failed --- update-git+cogito.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/update-git+cogito.sh b/update-git+cogito.sh index 86f24af..31da23b 100755 --- a/update-git+cogito.sh +++ b/update-git+cogito.sh @@ -6,10 +6,15 @@ # Install latest git and cogito to $INSTALL_PREFIX/$name and # link the binaries to $BINDIR # Needs git and cogito to work! +# And: +# - libexpat-dev +# - libcurl3-dev +# - libssl-dev +# - libz-dev BASE_GET=http://www.kernel.org/pub/scm/ PROJECTS="git/git.git cogito/cogito.git" -BUILDDIR=/home/nico/build +BUILDDIR=/home/user/nico/build INSTALL_PREFIX=/usr/packages BINDIR=/usr/local/bin @@ -34,6 +39,11 @@ for project in $PROJECTS; do cg-update origin fi + if [ $? -ne 0 ]; then + echo "Pull or clone failed, aborting now." + exit 23 + fi + cd "$BUILDDIR/$realname" version=$(cg-object-id) echo "Installing $realname (Version: $version)" From d47a0de162450ddbcea4bc91d57a5896b14e3c1a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 7 Dec 2005 21:22:56 +0100 Subject: [PATCH 5/7] ABORT should be BIG --- update-git+cogito.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-git+cogito.sh b/update-git+cogito.sh index 31da23b..45727cc 100755 --- a/update-git+cogito.sh +++ b/update-git+cogito.sh @@ -40,7 +40,7 @@ for project in $PROJECTS; do fi if [ $? -ne 0 ]; then - echo "Pull or clone failed, aborting now." + echo "Pull or clone failed, ABORTING." exit 23 fi From 75fe308b50161d9b8b75f472edf80cd76f087b0e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 7 Dec 2005 21:42:09 +0100 Subject: [PATCH 6/7] Added minimal git-snapshot script --- git-snapshot.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 git-snapshot.sh diff --git a/git-snapshot.sh b/git-snapshot.sh new file mode 100755 index 0000000..c6e54f0 --- /dev/null +++ b/git-snapshot.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Nico Schottelius +# Date: Di Okt 18 00:02:17 CEST 2005 +# Last Changed: - + +GIT_DIR=~/git/cinit +OUTPUT=/home/user/nico/www/org/schottelius/linux/cinit/archives/cinit-snapshot.tar.bz2 + +set -e + +cd "$GIT_DIR" +git-tar-tree $(git-log | head -n1 | awk '{ print $2 }') | bzip2 -9 -c > "$OUTPUT" From ea23b315a67edbb6703cc88fa45cde77b89d788f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Dec 2009 18:29:56 +0100 Subject: [PATCH 7/7] append projectname to readme Signed-off-by: Nico Schottelius --- README => README.clinux-dev-scripts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.clinux-dev-scripts (100%) diff --git a/README b/README.clinux-dev-scripts similarity index 100% rename from README rename to README.clinux-dev-scripts