DEB build scripts: added support for ctags.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/18/head
Michele Calgaro 4 years ago
parent 79c60593ee
commit decf98691c
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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

@ -67,8 +67,9 @@ function _set_path_variables()
REPO_EXTRA_DEPENDENCIES="$TDE_DIR/$CFG_GIT_DIR/$CFG_EXTRA_DEPS_DIR" REPO_EXTRA_DEPENDENCIES="$TDE_DIR/$CFG_GIT_DIR/$CFG_EXTRA_DEPS_DIR"
BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR" BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR"
TDE_BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR/build" TDE_BUILD_DIR="$BUILD_DIR/build"
TDE_DEBS_DIR="$TDE_DIR/$CFG_BUILD_DIR/debs" TDE_DEBS_DIR="$BUILD_DIR/debs"
TDE_TAGS_DIR="$BUILD_DIR/tags"
HOOK_DIR="$TDE_DIR/$CFG_GIT_DIR/$CFG_HOOKS_DIR" HOOK_DIR="$TDE_DIR/$CFG_GIT_DIR/$CFG_HOOKS_DIR"

@ -5,6 +5,7 @@
flag_INCREMENTAL="n" flag_INCREMENTAL="n"
flag_VERBOSE_LOG="n" flag_VERBOSE_LOG="n"
flag_SWITCH_ONLY="n" flag_SWITCH_ONLY="n"
flag_SKIP_TAGS="n"
OVERRIDE_DEFAULT_REPO_BRANCH="" OVERRIDE_DEFAULT_REPO_BRANCH=""
for ((idx=1; idx<=$#; idx++)); do for ((idx=1; idx<=$#; idx++)); do
arg="${!idx}" arg="${!idx}"
@ -25,7 +26,13 @@ for ((idx=1; idx<=$#; idx++)); do
fi fi
elif [ "$arg" = "-so" ]; then # switch branch only (Switch Only) elif [ "$arg" = "-so" ]; then # switch branch only (Switch Only)
flag_SWITCH_ONLY="y" && ((idx++)) 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 fi
done done
@ -245,3 +252,9 @@ fi
# Update completed # Update completed
[ -f "$UPDATE_LOCK_FILENAME" ] && rm "$UPDATE_LOCK_FILENAME" [ -f "$UPDATE_LOCK_FILENAME" ] && rm "$UPDATE_LOCK_FILENAME"
cd $SCRIPT_DIR cd $SCRIPT_DIR
# Generate ctags
if [ "$flag_SKIP_TAGS" != "y" ]; then
$SCRIPT_DIR/generate_tags.sh
fi

Loading…
Cancel
Save