Page MenuHomePhabricator

update_ctags.sh

Authored By
dctrwatson
Apr 23 2014, 12:38 AM
Size
1007 B
Referenced Files
None
Subscribers
None

update_ctags.sh

#!/usr/bin/env bash
declare -A proj2repo=(
["phabricator"]="P"
["arcanist"]="ARC"
)
PHAB_INSTALL=/opt/phabricator/phabricator
PHAB_REPOS=/var/lib/phabricator/repos
PHAB_CTAGS=/var/lib/phabricator/ctags
rm ${PHAB_CTAGS}/*
for PROJ in "${!proj2repo[@]}" ; do
REPO=${proj2repo["$PROJ"]}
TMP_REPO=/tmp/${REPO}
mkdir -p ${TMP_REPO}
chown -R www-data:www-data ${TMP_REPO}
cd ${TMP_REPO}
export GIT_DIR=${PHAB_REPOS}/${REPO}
export GIT_WORK_TREE=${TMP_REPO}
sudo -u www-data git reset --hard master
sudo -u www-data git clean -fdx
find . -name '*.py' | ${PHAB_INSTALL}/scripts/symbols/generate_ctags_symbols.php > ${PHAB_CTAGS}/${PROJ}
find . -name '*.scala' | ${PHAB_INSTALL}/scripts/symbols/generate_ctags_symbols.php >> ${PHAB_CTAGS}/${PROJ}
find . -name '*.go' | ${PHAB_INSTALL}/scripts/symbols/generate_ctags_symbols.php >> ${PHAB_CTAGS}/${PROJ}
${PHAB_INSTALL}/scripts/symbols/import_project_symbols.php ${PROJ} < ${PHAB_CTAGS}/${PROJ}
done

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/uq/la/hhdch2cdkopl6d3u
Default Alt Text
update_ctags.sh (1007 B)

Event Timeline