-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathregenHawcTags.sh
More file actions
executable file
·22 lines (19 loc) · 1.18 KB
/
regenHawcTags.sh
File metadata and controls
executable file
·22 lines (19 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/bash
date
echo "building tags for HAWC codebase..."
cd $HAWC_HOME
# find . -name "*.py" | grep -v "./target/" | grep -v "./unsynced/" | ctags -f .hawcTags -L -
find . -name "*.py" | ctags --python-kinds=-i -f .hawcTags -L -
# little bit trickier. We build the tags file, but then we want to change the path of each reference
# from a relative one ("./matplotlib/whatever") to absolute ("/Users/38593...virtualenvs...matplotlib/whatever")
date
echo "building tags for installed packages..."
# cd /Users/38593/.virtualenvs/hawc2021/lib/python3.9/site-packages
cd /Users/38593/.virtualenvs/hawc2024/lib/python3.12/site-packages
find . -name "*.py" | ctags --python-kinds=-i -f $HAWC_HOME/.hawcVirtualEnvInstalledPackagesTagsRelative -L -
date
echo "fixing absolute paths for package..."
cd $HAWC_HOME
# cat .hawcVirtualEnvInstalledPackagesTagsRelative | sed 's-\t\./-\t/Users/tfeiler/.virtualenvs/hawc2021/lib/python3.9/site\-packages/-' > .hawcVirtualEnvInstalledPackagesTags
cat .hawcVirtualEnvInstalledPackagesTagsRelative | sed 's-\t\./-\t/Users/38593/.virtualenvs/hawc2025/lib/python3.12/site\-packages/-' > .hawcVirtualEnvInstalledPackagesTags
rm .hawcVirtualEnvInstalledPackagesTagsRelative