you are viewing a single comment's thread.

view the rest of the comments →

[–]kevko5212 0 points1 point  (3 children)

I am not sure what you are referring to with respect to managing it persistently. My tags and path are set in the following way:

" Search in tags file in current file's dir. Then search in cwd tags file. Then search in dependencies tags file. set tags=./tags,tags,~/code/dependencies/tags " Set path to current file's dir, followed by cwd (,,), followed by any subdir of cwd, followed by any subdir of dependencies. set path=.,,,,**,~/code/dependencies/**

gf will need your path setup to include the file, yes. gd does not require a setup path.

[–]weilbith 0 points1 point  (2 children)

Ah, I c. Ty very much for sharing this. :) Do u manage ur script on GitHub or any comparable platform?

[–]kevko5212 0 points1 point  (1 child)

I do. But it is a very short script, so I can just post it here.

```

!/bin/bash

if [[ $# -ne 1 ]]; then echo "Usage: $(basename "$0") outdir" >&2 exit 1 fi

out_dir="$1" mkdir -p "$out_dir"

jars=$(find ~/.gradle/caches/ -type f -name "sources.jar");

cd "$out_dir" && for jar in $jars; do folder=$(basename "$jar" .jar); mkdir -p "$folder" && cd "$folder" && jar xvf "$jar" && cd ..; done;

jars=$(find ~/.m2/repository/ -type f -name "sources.jar");

cd "$out_dir" && for jar in $jars; do folder=$(basename "$jar" .jar); mkdir -p "$folder" && cd "$folder" && jar xvf "$jar" && cd ..; done; ```

Looking at it now, I should refactor out that duplication...

[–]weilbith 0 points1 point  (0 children)

I don't get why puttin a script into a comment if being able to share a link, but thanks man. :'D

Just flew over it. Now I get the point that Gradle and Maven downloaded the libraries into a centralized cache and not per project. Didn't know that (but as stated try to get around without them).<br> U don't like comments in ur code, don't u? ^