-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup_sekiro_saves.sh
49 lines (46 loc) · 2.06 KB
/
backup_sekiro_saves.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
# Copyright (C) 2022 WesleyBlancoYuan
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Recommended to run with gitbash, or "Ubuntu for Windows", or any
# equivalent Linux bash in Windows
# all windows path are annotated with "/", not Windows classical "\"
# to be compatible with (future possible) Linux path
echo
echo '=================================================='
echo '=================================================='
echo '===== Sekiro: Shadow die twice(tm) ====='
echo '===== Backup your save file ====='
echo '===== ====='
echo '===== by ====='
echo '===== ====='
echo '===== github.com/WesleyBlancoYuan ====='
echo '=================================================='
echo '=================================================='
echo
# adapt as your needs
DEST=/e/games/sekiro_saves
# $APPDATA points to "/c/Users/<your-username>/AppData/Roaming"
# always the same
SOURCE=$APPDATA/Sekiro/76561198090276100
# read new name to identify. Unicode characters are allowed, for example CJK
read -p "Backup save file to $DEST with this name: " FILENAME
# it is not allowed to "copy and rename" when DEST is not same dir(stupid), so we have
# to copy and rename(mv). Use "cp -f" to overwrite
cp -v -f "$SOURCE/S0000.sl2" $DEST
cd $DEST
mv S0000.sl2 $FILENAME.sl2
echo Latest save copied to "$DEST/$FILENAME.sl2"
sleep 5 # wait 5 sec and close