File: updateversion.sh

package info (click to toggle)
seafile 6.2.11-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,468 kB
  • sloc: ansic: 34,270; python: 5,192; makefile: 249; sh: 239
file content (21 lines) | stat: -rwxr-xr-x 604 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh

if [ $# != "2" ]; then
    echo "$0 <old_version> <new_version>"
    exit
fi

old_ver=$1
new_ver=$2

if test "$(uname)" = "Darwin"; then
    sed -i '' -e "s|$old_ver|$new_ver|" web/setup_mac.py
    sed -i '' -e "s|VERSION=$old_ver|VERSION=$new_ver|" setupmac.sh
    sed -i '' -e "s|<string>$old_ver</string>|<string>$new_ver</string>|" gui/mac/seafile/seafile/*.plist
else
    sed -i  "s|$old_ver|$new_ver|" web/setup_mac.py
    sed -i "s|VERSION=$old_ver|VERSION=$new_ver|" setupmac.sh
    sed -i "s|<string>$old_ver</string>|<string>$new_ver</string>|" gui/mac/seafile/seafile/*.plist

fi