Skip to content

Commit

Permalink
vrchatのyaiba出力ログをコピーするshell scriptを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Geson-anko committed Jul 11, 2024
1 parent 3e10a32 commit b359a1b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions scripts/copy-vrchat-logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# VRChat log directory path
vrchat_log_dir=~/.steam/steam/steamapps/compatdata/438100/pfx/drive_c/users/steamuser/AppData/LocalLow/VRChat/VRChat

# Set output directory based on script execution location
script_path=$(realpath "$0")
script_dir=$(dirname "$script_path")
if [[ "$script_dir" == */scripts ]]; then
output_dir="$script_dir/../logs/vrchat-logs"
else
output_dir="$script_dir/logs/vrchat-logs"
fi

# Create output directory if it doesn't exist
mkdir -p "$output_dir"

# Copy all log files
log_files=$(find "$vrchat_log_dir" -name "output_log_*.txt")
copied_count=0

for log_file in $log_files; do
cp "$log_file" "$output_dir/"
file_name=$(basename "$log_file")
echo "Copied '$file_name' to 'logs/vrchat-logs'."
((copied_count++))
done

if [ $copied_count -gt 0 ]; then
echo "Copied $copied_count log file(s)."
else
echo "No log files found."
fi

0 comments on commit b359a1b

Please sign in to comment.