-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from tktcorporation/dev
dev
- Loading branch information
Showing
25 changed files
with
548 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
# スクリプトがエラーに遭遇した場合に終了し、未定義の変数を参照した場合にも終了 | ||
set -eu | ||
|
||
# 引数の解析 | ||
skip_confirmation=false | ||
while getopts "y" opt; do | ||
case $opt in | ||
y) | ||
skip_confirmation=true | ||
;; | ||
\?) | ||
echo "無効なオプション: -$OPTARG" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# スクリプトのディレクトリを取得 | ||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" | ||
|
||
delete_file_path="$script_dir/photos" | ||
delete_file_names=( | ||
# このツールで作成するJoin記録用の画像ファイル | ||
"VRChat*wrld*.png" | ||
# VRChatで写真を撮ったときに作成される画像ファイル | ||
# (開発環境では `genDevFiles.sh` で作成する`) | ||
"VRChat_*x*.png" | ||
) | ||
|
||
# まず対象の確認 | ||
for delete_file_name in "${delete_file_names[@]}"; do | ||
find $delete_file_path -name $delete_file_name | ||
done | ||
|
||
# 確認 | ||
# -y がついていた場合は確認をスキップ | ||
if [ "$skip_confirmation" = false ]; then | ||
read -p "削除しますか? [y/N]: " yn | ||
case "$yn" in | ||
[yY]*) ;; | ||
*) echo "終了します" ; exit 1 ;; | ||
esac | ||
fi | ||
|
||
# 削除 | ||
for delete_file_name in "${delete_file_names[@]}"; do | ||
find $delete_file_path -name $delete_file_name -delete | ||
done | ||
|
||
echo "削除しました" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
# スクリプトがエラーに遭遇した場合に終了し、未定義の変数を参照した場合にも終了 | ||
set -eu | ||
|
||
# スクリプトのディレクトリを取得 | ||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" | ||
|
||
# コピー元のファイル(スクリプトの場所からの相対パス) | ||
source_file="$script_dir/VRChat_2023-10-01_03-01-18.551_2560x1440_sample.png" | ||
|
||
# コピー先のファイル名の配列(スクリプトの場所からの相対パス) | ||
destination_files=( | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-44.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_01-19-50.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_01-01-18.551_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-47.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-45.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_01-22-50.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-41.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_02-01-18.551_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_00-01-18.551_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-01_03-01-18.551_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-46.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-40.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_01-21-50.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-43.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-42.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-11/VRChat_2023-11-08_15-11-42.163_2560x1440.png" | ||
"./debug/photos/VRChat/2023-11/VRChat_2023-11-08_15-12-11.163_2560x1440.png" | ||
) | ||
|
||
# 各ファイルにコピー | ||
for dest_file in "${destination_files[@]}" | ||
do | ||
# ファイルが既に存在する場合はスキップ | ||
if [ ! -f "$dest_file" ]; then | ||
cp "$source_file" "$dest_file" | ||
echo "File $dest_file created." | ||
else | ||
echo "File $dest_file already exists, skipping." | ||
fi | ||
done | ||
|
||
|
Binary file removed
BIN
-62.4 KB
debug/photos/VRChat/2023-10/VRChat_2023-10-08_00-01-18.551_2560x1440.png
Binary file not shown.
Binary file removed
BIN
-62.4 KB
debug/photos/VRChat/2023-10/VRChat_2023-10-08_01-01-18.551_2560x1440.png
Binary file not shown.
Binary file removed
BIN
-62.4 KB
debug/photos/VRChat/2023-10/VRChat_2023-10-08_01-19-50.163_2560x1440.png
Binary file not shown.
Binary file removed
BIN
-62.4 KB
debug/photos/VRChat/2023-10/VRChat_2023-10-08_01-21-50.163_2560x1440.png
Binary file not shown.
Binary file removed
BIN
-62.4 KB
debug/photos/VRChat/2023-10/VRChat_2023-10-08_01-22-50.163_2560x1440.png
Binary file not shown.
Binary file removed
BIN
-62.4 KB
debug/photos/VRChat/2023-10/VRChat_2023-10-08_02-01-18.551_2560x1440.png
Binary file not shown.
Binary file removed
BIN
-62.4 KB
debug/photos/VRChat/2023-10/VRChat_2023-10-08_08-21-40.163_2560x1440.png
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.