summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild12
-rwxr-xr-xscript/trees8
2 files changed, 8 insertions, 12 deletions
diff --git a/build b/build
index b7af9048..91843d3f 100755
--- a/build
+++ b/build
@@ -92,7 +92,8 @@ build_release()
{
(
cd "$srcdir" || $err "$vdir: !cd \"$srcdir\""
- fetch_trees
+ ./update trees -f
+ rmgit .
x_ mv src/docs docs
) || $err "can't create release files"
@@ -119,15 +120,6 @@ build_release()
rm -Rf "$srcdir" || $err "!rm -Rf $srcdir"
}
-fetch_trees()
-{
- for x in $(ls -1 config/git); do
- ./update trees -f "$x" || $err "$vdir: fetch $x"
- singletree "$x" || x_ rm -Rf "src/$x/$x"
- done
- rmgit .
-}
-
fail()
{
tmp_cleanup || printf "WARNING: can't rm tmpfiles: %s\n" "$TMPDIR" 1>&2
diff --git a/script/trees b/script/trees
index 2b7dfaf0..10c08d1e 100755
--- a/script/trees
+++ b/script/trees
@@ -31,11 +31,15 @@ main()
-n) mode="nconfig" ;;
*) $err "invalid option '-$option'" ;;
esac
- [ -n "${OPTARG+x}" ] || $err "OPTARG not set"
+ [ -z "${OPTARG+x}" ] && shift 1 && break
project="${OPTARG#src/}"; shift 2
done
[ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)"
- [ -z "$project" ] && $err "project name not specified"
+ [ -z "$project" ] && for p in $(ls -1 config/git); do
+ ./update trees $_f "$p" || $err "!./update trees $_f $p"
+ [ "$XBMK_RELEASE" != "y" ] || singletree "$p" || \
+ x_ rm Rf "src/$p/$p"; continue
+ done && return 0
[ -f "config/git/$project/pkg.cfg" ] || $err "'$project' not defined"