Skip to content

Commit 8c7e30a

Browse files
committed
rclone location change
1 parent 64e3f85 commit 8c7e30a

File tree

2 files changed

+349
-486
lines changed

2 files changed

+349
-486
lines changed

bash/images.sh

+67-2
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,77 @@ for d in ./*/; do
5555

5656
echo "Generating $SEARCH for $d"
5757

58+
regex="-packageName-([a-zA-Z\d\_.]*)"
59+
if [[ $d =~ $regex ]]; then
60+
name="${BASH_REMATCH[1]}"
61+
#echo "packagename in map: ${name}"
62+
63+
existingDir=''
64+
existingDir=$(find ../ -maxdepth 1 -type d -name "*${name}*" -print)
65+
if [[ "$existingDir" != "" ]]; then
66+
echo "existingDir found: ${existingDir}"
67+
idregex="-steam-([0-9]*)"
68+
if [[ $existingDir =~ $idregex ]]; then
69+
foundif="${BASH_REMATCH[1]}"
70+
echo "REUSING foundid found: ${foundif}"
71+
DIRZ=${d::-1}
72+
cd ../
73+
mv "$DIRZ" "${d::-1} -steam-${foundif}"
74+
addToSyncedFile "$d"
75+
continue
76+
fi
77+
78+
idregex="-oculus-([0-9]*)"
79+
if [[ $existingDir =~ $idregex ]]; then
80+
foundif="${BASH_REMATCH[1]}"
81+
echo "REUSING foundid found: ${foundif}"
82+
DIRZ=${d::-1}
83+
cd ../
84+
mv "$DIRZ" "${d::-1} -oculus-${foundif}"
85+
addToSyncedFile "$d"
86+
continue
87+
fi
88+
89+
idregex="-NA-"
90+
if [[ $existingDir == *"-NA-"* ]]; then
91+
echo "-NA- found:"
92+
DIRZ=${d::-1}
93+
cd ../
94+
mv "$DIRZ" "${d::-1} -NA-"
95+
addToSyncedFile "$d"
96+
continue
97+
fi
98+
99+
# if [[ "$existingDir" != *"-NA-"* ]]; then
100+
# foundif="${BASH_REMATCH[1]}"
101+
# echo "REUSING foundid found: ${foundif}"
102+
# DIRZ=${d::-1}
103+
# cd ../
104+
# mv "$DIRZ" "${d::-1} -oculus-${foundif}"
105+
# addToSyncedFile "$d"
106+
# continue
107+
# fi
108+
109+
fi
110+
111+
fi
112+
113+
# if compgen -G "${PROJECT_DIR}/*.png" > /dev/null; then
114+
# echo "pattern exists!"
115+
# fi
116+
#sleep 1
117+
# cd ..
118+
# continue
119+
# sleep 19
120+
# exit
121+
122+
58123

59124
link=$(curl -G --silent --data-urlencode "vrsupport=1" --data-urlencode "term=$SEARCH" -L "https://store.steampowered.com/search/" | sed -En '/search_capsule"><img/s/.*src="([^"]*)".*/\1/p' | head -n 1)
60125

61126
link=${link%%\?*}
62127

63-
echo "$link"
128+
echo "$link\n"
64129

65130
if [[ "$link" != *".jpg" ]] || [[ "$link" == *"/bundles/"* ]] || [[ "$link" == "" ]] || [[ "$link" != *"jpg" ]] ;then
66131
echo "NOT A REAL IMAGE -> $link"
@@ -85,7 +150,7 @@ for d in ./*/; do
85150
ID=${ID##*apps/}
86151
echo "ID FOUND: $ID"
87152
DIRZ=${d::-1}
88-
echo "d: $DIRZ"
153+
#echo "d: $DIRZ"
89154
cd ../
90155

91156

0 commit comments

Comments
 (0)