File tree Expand file tree Collapse file tree 4 files changed +10
-9
lines changed
Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ check_command() {
2121 local install_hint=" $3 "
2222
2323 if command -v " $cmd " > /dev/null 2>&1 ; then
24- local version=$( $cmd --version 2>&1 | head -n 1 || echo " unknown" )
24+ local version
25+ version=$( $cmd --version 2>&1 | head -n 1 || echo " unknown" )
2526 echo -e " ${GREEN} ✓${NC} $cmd : $version "
2627 return 0
2728 else
@@ -96,7 +97,7 @@ echo "--- Optional Tools ---"
9697check_command " git" " optional" " https://git-scm.com/downloads"
9798check_command " gh" " optional" " https://cli.github.com/"
9899
99- # Environment file check
100+ # Environment file check (optional in CI)
100101echo " "
101102echo " --- Configuration ---"
102103if [ -f " .env" ]; then
@@ -129,9 +130,9 @@ if [ -f ".env" ]; then
129130 echo -e " ${YELLOW} ⚠${NC} LOCAL_TZ: not set (will default to Asia/Taipei)"
130131 fi
131132else
132- echo -e " ${RED} ✗ ${NC} .env file NOT FOUND"
133+ echo -e " ${YELLOW} ⚠ ${NC} .env file NOT FOUND (optional for CI) "
133134 echo " Run: cp .env.sample .env"
134- (( ERRORS ++ ))
135+ (( WARNINGS ++ ))
135136fi
136137
137138# Summary
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ install_jq() {
6969 echo " Please install jq manually:"
7070 echo " 1. Download from: https://stedolan.github.io/jq/download/"
7171 echo " 2. Rename to jq.exe"
72- echo " 3. Place in: C:\\ Program Files\\ Git\\ usr\\ bin\\ "
72+ printf " 3. Place in: C:\\\\ Program Files\\\\ Git\\\\ usr\\\\ bin\\\\\\ n "
7373 return 1
7474 fi
7575 ;;
@@ -104,7 +104,7 @@ install_yq() {
104104 echo " Please install yq manually:"
105105 echo " 1. Download from: https://github.com/mikefarah/yq/releases"
106106 echo " 2. Rename to yq.exe"
107- echo " 3. Place in: C:\\ Program Files\\ Git\\ usr\\ bin\\ "
107+ printf " 3. Place in: C:\\\\ Program Files\\\\ Git\\\\ usr\\\\ bin\\\\\\ n "
108108 return 1
109109 fi
110110 ;;
@@ -206,9 +206,7 @@ main() {
206206
207207 # Final check
208208 echo -e " ${BLUE} === Verification ===${NC} "
209- bash scripts/check_dependencies.sh
210-
211- if [ $? -eq 0 ]; then
209+ if bash scripts/check_dependencies.sh; then
212210 echo " "
213211 echo -e " ${GREEN} === Installation Complete! ===${NC} "
214212 echo " "
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Q="${1:?domain or query}"
99CASE_SLUG=" ${2:? CASE_SLUG} "
1010export CASE_SLUG
1111
12+ # shellcheck disable=SC2001
1213SAFE=$( echo " $Q " | sed ' s#[^A-Za-z0-9._-]#_#g' )
1314OUT=" outputs/${CASE_SLUG} /urlscan_search_${SAFE} .json"
1415mkdir -p " outputs/${CASE_SLUG} "
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ TARGET_URL="${1:?URL required}"
99CASE_SLUG=" ${2:? CASE_SLUG} "
1010export CASE_SLUG
1111
12+ # shellcheck disable=SC2001
1213SAFE_NAME=$( echo " $TARGET_URL " | sed ' s#[^A-Za-z0-9._-]#_#g' )
1314OUT=" outputs/${CASE_SLUG} /wayback_${SAFE_NAME} .json"
1415mkdir -p " outputs/${CASE_SLUG} " " data/wayback/${CASE_SLUG} "
You can’t perform that action at this time.
0 commit comments