-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharma3server-tolower.sh
More file actions
52 lines (47 loc) · 1.52 KB
/
Copy patharma3server-tolower.sh
File metadata and controls
52 lines (47 loc) · 1.52 KB
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
50
51
52
#!/bin/bash
#####
# Скрипт создает в директории сервера символьные ссылки
# в нижнем регистре на отсутствующие у сервера файлы игры.
#
# Запуск
# GAME="путь/к/a2oa" SERVER="путь/к/серверу" ./arma3server-tolower.sh
#
# После обновления игры могут появиться битые ссылки
# на отсутствующие файлы, их нужно удалять.
#####
IFS=$'\n'
if cd ${GAME}
then
mkdir -p ${SERVER}
array=( $(find -L . -not \( -path "./steamapps/common/*" -prune \) \
-not \( -path "*/shadercache/*" -prune \) \
-not \( -path "*/steamapps/compatdata/*" -prune \) \
-not \( -path "*download*" -prune \) \
-not \( -path "*/temp/*" -prune \) \
-not \( -path "*/.wine/*" -prune \) \
-not \( -path "*/.proton/*" -prune \) \
-type d ) )
for i in "${array[@]}"
do
if [ ! -d ${SERVER}/${i,,} ]
then
mkdir ${SERVER}/${i,,}
fi
done
array=( $(find -L . -not \( -path "./steamapps/common/*" -prune \) \
-not \( -path "*/shadercache/*" -prune \) \
-not \( -path "*/steamapps/compatdata/*" -prune \) \
-not \( -path "*download*" -prune \) \
-not \( -path "*/temp/*" -prune \) \
-not \( -path "*/.wine/*" -prune \) \
-not \( -path "*/.proton/*" -prune \) \
-not \( -iname "appmanifest*.tmp" -prune \) \
-type f ) )
for i in "${array[@]}"
do
if [ ! -f ${SERVER}/${i,,} ] && [ ! -L ${SERVER}/${i,,} ]
then
ln -s ${GAME}/${i} ${SERVER}/${i,,}
fi
done
fi