-
Notifications
You must be signed in to change notification settings - Fork 3
/
update.sh
executable file
·37 lines (32 loc) · 794 Bytes
/
update.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
#!/bin/sh -ex
# Updates to the latest version of exiftool. Assumes we can git clone exiftool
# into the parent directory.
if [ ! -d ../exiftool ]; then
(
cd ..
git clone [email protected]:exiftool/exiftool.git
)
fi
(
cd ../exiftool
git add .
git stash -u
git checkout master
git pull
)
rm -rf bin
mkdir -p bin
cp -rp ../exiftool/* bin
# Fix https://exiftool.org/forum/index.php?topic=16271.0
for i in bin/exiftool bin/build_geolocation; do
sed '1 s/ -w$//' -i $i
done
rm -rf bin/t bin/html bin/windows_exiftool
# Are there pending updates?
if [ "$(git status --porcelain=v1 2>/dev/null | wc -l)" -eq 0 ]; then
echo "No-op: already up to date"
else
# exiftool never has a patch version:
NEWVER=$(bin/exiftool -ver).0-pre
yarn version --new-version "$NEWVER"
fi