From 9d18d292217f12e30467832f6ded72c70e67967b Mon Sep 17 00:00:00 2001 From: rhatto Date: Mon, 19 Jan 2009 16:13:58 +0000 Subject: adding mkbuild --status git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@756 04377dda-e619-0410-9926-eae83683ac58 --- trunk/doc/CHANGELOG | 4 ++-- trunk/src/createpkg | 2 ++ trunk/src/mkbuild | 38 +++++++++++++++++++++++++++++++++++--- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/trunk/doc/CHANGELOG b/trunk/doc/CHANGELOG index 4c5b141..21f945e 100644 --- a/trunk/doc/CHANGELOG +++ b/trunk/doc/CHANGELOG @@ -28,7 +28,7 @@ simplepkg changelog - default configuration making createpkg repository integrated with simplaret - new repositories - mkbuild: - - added --edit command line option + - added --edit command line options, among others - code cleanup - all previous "commit" functions and command line options changed to "submit" as they don't really commit files into the svn repository @@ -44,7 +44,7 @@ simplepkg changelog - config() on postinstall_script now accepting .dist and .sample config file extensions - added git_source section - createpkg: - - new options --import, --status, --update and --commit to manage subversion repository + - new options --import, --status, --update and --commit to manage subversion repository, among others - subversion integration - minor changes - renamed config parameter CREATE_ARCH to CREATEPKG_ARCH diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 0a67648..b3b3f97 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -309,6 +309,8 @@ function repository_update { function repository_status { + local cwd + if [ -d "$PACKAGES_DIR/.svn" ]; then echo "Status of $PACKAGES_DIR." cwd="`pwd`" diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index 00d6ac2..d185ee0 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -84,6 +84,8 @@ ${red}DESCRIPTION${normal} import SlackBuild repository in a svn tree ${red}-ia${normal}, ${red}-i${normal}, ${red}--import-all${normal}, ${red}--import${normal} import mkbuild and SlackBuild repositories in a svn tree + ${red}--status${normal} + print mkbuild and SlackBuild svn repositories status ${red}-h${normal}, ${red}--help${normal} this help mesage ${red}-n${normal}, ${red}--new${normal} ${green}${normal} @@ -178,23 +180,28 @@ function set_parameters { break # we need to break otherwise commit log message is evalued ;; '-is'|'--import-slackbuilds') - # Commit SlackBuild file + # Import SlackBuilds ACTION="import_slackbuilds" MKBUILD_NAME="${2//.mkbuild}.mkbuild" break # we need to break otherwise specific arguments are evalued ;; '-im'|'--import-mkbuilds') - # import mkbuild file + # Import mkbuilds ACTION="import_mkbuilds" MKBUILD_NAME="${2//.mkbuild}.mkbuild" break # we need to break otherwise specific arguments are evalued ;; '-ia'|'-i'|'--import-all'|'--import') - # Commit SlackBuild and mkbuild file + # Import SlackBuilds and mkbuilds ACTION="import_all" MKBUILD_NAME="${2//.mkbuild}.mkbuild" break # we need to break otherwise specific arguments are evalued ;; + '--status') + # Repository status + ACTION="status" + break # we need to break otherwise specific arguments are evalued + ;; '-um'|'--update-manifest') ACTION="update_manifest" MKBUILD_NAME="${2//.mkbuild}.mkbuild" @@ -746,6 +753,28 @@ function import_slackbuilds { } +function repository_status { + + local cwd + + if [ -d "$MKBUILDS_DIR/.svn" ]; then + echo "Status of $MKBUILDS_DIR." + cwd="`pwd`" + cd $MKBUILDS_DIR && su_svn status + cd $cwd + fi + + if [ -d "$SLACKBUILDS_DIR/.svn" ]; then + cwd="`pwd`" + echo "Status of $SLACKBUILDS_DIR." + cd $SLACKBUILDS_DIR && su_svn status + cd $cwd + fi + + exit 0 + +} + # ---------------------------------------------------------------- # general functions # ---------------------------------------------------------------- @@ -1560,6 +1589,9 @@ if [ ! -z "$MKBUILD_NAME" ]; then 'search') search_mkbuild -i ;; + 'status') + repository_status + ;; 'edit') edit_mkbuild ;; -- cgit v1.2.3