commit: 3d1b803c553435a85074e95a16da9b0cb674fc73
Author: John R. Graham <john_r_graham <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 14 19:19:18 2019 +0000
Commit: John R. Graham <john_r_graham <AT> gentoo <DOT> org>
CommitDate: Sat Dec 14 19:28:03 2019 +0000
URL: https://gitweb.gentoo.org/proj/forums.git/commit/?id=3d1b803c
Created branch to work on the initial pass at repo setup.
Also going to work on the forum installation instructions here.
Signed-off-by: John R. Graham <john_r_graham <AT> gentoo.org>
.gitignore | 3 +++
workdir-setup.bash | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..36afc36fd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+style
+phpbb
+*~
diff --git a/workdir-setup.bash b/workdir-setup.bash
new file mode 100755
index 000000000..2fcfd2b3c
--- /dev/null
+++ b/workdir-setup.bash
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+function setup_worktree() {
+ directory="$1"
+ branch="$2"
+
+ if [[ -z "$branch" ]] ; then
+ echo "Error in call to setup_branch()."
+ exit 1
+ fi
+
+ if [[ ! -d "${directory}" ]] ; then
+ if [[ -e "${directory}" ]] ; then
+ echo "Error: Strange repository structure found for
directory \"${directory}\". Cannot continue with the setup."
+ exit 1
+ fi
+
+ echo "Adding worktree for ${directory} source from branch
${branch} ..."
+ git worktree add ${directory} ${branch}
+ let worktree_count=worktree_count+1
+ fi
+}
+
+# set -x
+set -e
+
+worktree_count=0
+
+setup_worktree phpbb refs/heads/origin/3.2.x
+setup_worktree style refs/heads/styles/Gentoo-SUBSILVER
+
+if [[ $worktree_count -eq 0 ]] ; then
+ echo "Working directory already set up."
+else
+ echo "Working directory setup complete."
+fi
+
+echo