mirror of
https://hk.gh-proxy.com/https://github.com/CaptainCore/do.git
synced 2025-10-03 23:34:10 +08:00
👌 IMPROVE: Dump naming
This commit is contained in:
parent
8c60f2e9d2
commit
02b216c6cb
1 changed files with 6 additions and 2 deletions
|
@ -22,10 +22,14 @@ function run_dump() {
|
|||
|
||||
local OUTPUT_BASENAME
|
||||
OUTPUT_BASENAME=$(basename "$SEARCH_DIR")
|
||||
local OUTPUT_FILE
|
||||
if [ "$OUTPUT_BASENAME" == "." ]; then
|
||||
OUTPUT_BASENAME="dump"
|
||||
# If searching in the current dir, use the folder's name for the output file.
|
||||
OUTPUT_BASENAME=$(basename "$(pwd)")
|
||||
OUTPUT_FILE="${OUTPUT_BASENAME}-dump.txt"
|
||||
else
|
||||
OUTPUT_FILE="${OUTPUT_BASENAME}.txt"
|
||||
fi
|
||||
local OUTPUT_FILE="${OUTPUT_BASENAME}.txt"
|
||||
|
||||
# --- 3. Process Files ---
|
||||
> "$OUTPUT_FILE"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue