summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-09-04 16:08:28 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-09-04 16:08:28 +0900
commitdecf98691c9ea9b2e5f7f598af4cf05e12fffb3d (patch)
tree42fa529dbf2810d33a904e0a64c74e88c80a33bc /debian
parent79c60593ee56790109a87a83328da05f7d217717 (diff)
downloadtde-packaging-decf98691c9ea9b2e5f7f598af4cf05e12fffb3d.tar.gz
tde-packaging-decf98691c9ea9b2e5f7f598af4cf05e12fffb3d.zip
DEB build scripts: added support for ctags.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/_buildscripts/local/generate_tags.sh24
-rwxr-xr-xdebian/_buildscripts/local/internals/_build_common.sh5
-rwxr-xr-xdebian/_buildscripts/local/update_repositories.sh15
3 files changed, 41 insertions, 3 deletions
diff --git a/debian/_buildscripts/local/generate_tags.sh b/debian/_buildscripts/local/generate_tags.sh
new file mode 100755
index 000000000..d11ecdb10
--- /dev/null
+++ b/debian/_buildscripts/local/generate_tags.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Load common code
+. ./internals/_build_common.sh
+init_common
+
+#----------------------------
+# Check for ctags existance
+if hash ctags 2>/dev/null; then
+
+ # Generate tags
+ if [ ! -d "$TDE_TAGS_DIR" ]; then
+ mkdir "$TDE_TAGS_DIR"
+ fi
+
+ echo "Generating all tags"
+ ctags -f "$TDE_TAGS_DIR/tags.all" "$REPO_TDE_MAIN"
+
+ echo "Generating core tags"
+ ctags -f "$TDE_TAGS_DIR/tags.core" "$REPO_TDE_MAIN/dependencies/tqt3"
+ ctags -a -f "$TDE_TAGS_DIR/tags.core" "$REPO_TDE_MAIN/tdelibs"
+ ctags -a -f "$TDE_TAGS_DIR/tags.core" "$REPO_TDE_MAIN/tdebase"
+
+fi
diff --git a/debian/_buildscripts/local/internals/_build_common.sh b/debian/_buildscripts/local/internals/_build_common.sh
index 105134084..04ce3377b 100755
--- a/debian/_buildscripts/local/internals/_build_common.sh
+++ b/debian/_buildscripts/local/internals/_build_common.sh
@@ -67,8 +67,9 @@ function _set_path_variables()
REPO_EXTRA_DEPENDENCIES="$TDE_DIR/$CFG_GIT_DIR/$CFG_EXTRA_DEPS_DIR"
BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR"
- TDE_BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR/build"
- TDE_DEBS_DIR="$TDE_DIR/$CFG_BUILD_DIR/debs"
+ TDE_BUILD_DIR="$BUILD_DIR/build"
+ TDE_DEBS_DIR="$BUILD_DIR/debs"
+ TDE_TAGS_DIR="$BUILD_DIR/tags"
HOOK_DIR="$TDE_DIR/$CFG_GIT_DIR/$CFG_HOOKS_DIR"
diff --git a/debian/_buildscripts/local/update_repositories.sh b/debian/_buildscripts/local/update_repositories.sh
index 91425f8a7..66bf7bc6b 100755
--- a/debian/_buildscripts/local/update_repositories.sh
+++ b/debian/_buildscripts/local/update_repositories.sh
@@ -5,6 +5,7 @@
flag_INCREMENTAL="n"
flag_VERBOSE_LOG="n"
flag_SWITCH_ONLY="n"
+flag_SKIP_TAGS="n"
OVERRIDE_DEFAULT_REPO_BRANCH=""
for ((idx=1; idx<=$#; idx++)); do
arg="${!idx}"
@@ -25,7 +26,13 @@ for ((idx=1; idx<=$#; idx++)); do
fi
elif [ "$arg" = "-so" ]; then # switch branch only (Switch Only)
flag_SWITCH_ONLY="y" && ((idx++))
- OVERRIDE_DEFAULT_REPO_BRANCH="${!idx}"
+ if ! [[ "${!idx}" =~ ^- ]]; then
+ OVERRIDE_DEFAULT_REPO_BRANCH="${!idx}"
+ else
+ ((idx--))
+ fi
+ elif [ "$arg" = "-st" ]; then # skip ctags generation (Skip Tags)
+ flag_SKIP_TAGS="y"
fi
done
@@ -245,3 +252,9 @@ fi
# Update completed
[ -f "$UPDATE_LOCK_FILENAME" ] && rm "$UPDATE_LOCK_FILENAME"
cd $SCRIPT_DIR
+
+# Generate ctags
+if [ "$flag_SKIP_TAGS" != "y" ]; then
+ $SCRIPT_DIR/generate_tags.sh
+fi
+