mirror of
https://github.com/imapsync/imapsync.git
synced 2025-07-25 19:48:14 +02:00
1.836
This commit is contained in:
parent
3afeea4a16
commit
8d76e44c5e
243 changed files with 57452 additions and 10330 deletions
32
W/tools/backup_old_dist
Executable file
32
W/tools/backup_old_dist
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: backup_old_dist,v 1.3 2017/09/11 03:04:20 gilles Exp gilles $
|
||||
|
||||
# Bye on any error not handled
|
||||
set -e
|
||||
|
||||
! test -f dist/imapsync && return
|
||||
|
||||
version_previous=`dist/imapsync --version || echo ERROR`
|
||||
echo "previous: [$version_previous]"
|
||||
|
||||
test "ERROR" != "$version_previous" || return 1
|
||||
|
||||
version_current=`cat VERSION || echo ERROR`
|
||||
|
||||
test "ERROR" != "$version_current" || return 1
|
||||
|
||||
echo "current: [$version_current]"
|
||||
|
||||
# nothing to backup
|
||||
test "$version_previous" = "$version_current" && return 0
|
||||
|
||||
test -d dist/old_releases/$version_previous || mkdir dist/old_releases/$version_previous && ( cd dist/old_releases/$version_previous )
|
||||
|
||||
pwd
|
||||
# all or nothing
|
||||
ls -ld dist/imapsync dist/imapsync-$version_previous.tgz dist/imapsync_$version_previous.zip || return 1
|
||||
# let's do it
|
||||
mv -vf dist/imapsync dist/imapsync_bin_Darwin dist/imapsync-$version_previous.tgz dist/imapsync_$version_previous.zip dist/old_releases/$version_previous
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue