@@ -6,21 +6,21 @@ export MSYS_NO_PATHCONV=1 # for Git Bash on Windows
6
6
7
7
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
8
8
ROOT_DIR=" $SCRIPT_DIR /../.."
9
- DEPENDENCIES_DOCKERFILE=" $SCRIPT_DIR /dependencies.dockerfile "
9
+ DEPENDENCIES_DOCKERFILE=" $SCRIPT_DIR /dependencies.Dockerfile "
10
10
11
11
# Parse command line arguments
12
- RELATIVE_ONLY =false
13
- MODIFIED_FILES =" "
12
+ LOCAL_LINKS_ONLY =false
13
+ TARGET =" "
14
14
15
15
while [[ $# -gt 0 ]]; do
16
16
case $1 in
17
- --relative -only)
18
- RELATIVE_ONLY =true
17
+ --local-links -only)
18
+ LOCAL_LINKS_ONLY =true
19
19
shift
20
20
;;
21
21
* )
22
22
# Treat any other arguments as file paths
23
- MODIFIED_FILES =" $MODIFIED_FILES $1 "
23
+ TARGET =" $TARGET $1 "
24
24
shift
25
25
;;
26
26
esac
29
29
# Extract lychee version from dependencies.dockerfile
30
30
LYCHEE_VERSION=$( grep " FROM lycheeverse/lychee:" " $DEPENDENCIES_DOCKERFILE " | sed ' s/.*FROM lycheeverse\/lychee:\([^ ]*\).*/\1/' )
31
31
32
- # Determine target files/directories and config file
33
- TARGET=" ."
34
- LYCHEE_CONFIG=" .github/scripts/.lychee.toml"
35
-
36
- if [[ " $RELATIVE_ONLY " == " true" ]]; then
37
- LYCHEE_CONFIG=" .github/scripts/.lychee-relative.toml"
38
- fi
39
-
40
- if [[ -n " $MODIFIED_FILES " ]]; then
41
- TARGET=" $MODIFIED_FILES "
32
+ if [[ -z " $TARGET " ]]; then
33
+ TARGET=" ."
42
34
fi
43
35
44
36
# Build the lychee command with optional GitHub token
45
- CMD=" lycheeverse/lychee:$LYCHEE_VERSION --verbose --config $LYCHEE_CONFIG "
37
+ CMD=" lycheeverse/lychee:$LYCHEE_VERSION --verbose --root-dir /data "
46
38
47
39
# Add GitHub token if available
48
40
if [[ -n " $GITHUB_TOKEN " ]]; then
49
41
CMD=" $CMD --github-token $GITHUB_TOKEN "
50
42
fi
51
43
44
+ if [[ " $LOCAL_LINKS_ONLY " == " true" ]]; then
45
+ CMD=" $CMD --scheme file --include-fragments"
46
+ else
47
+ CMD=" $CMD --config .github/scripts/lychee-config.toml"
48
+ fi
49
+
52
50
CMD=" $CMD $TARGET "
53
51
54
52
# Determine if we should allocate a TTY
0 commit comments