#!/bin/sh
# Copyright (c) 2000-2015 Synology Inc. All rights reserved.

# remove ":tag" of each image <-> desc pair
IMG_DESC=/var/packages/Docker/etc/image_description.json
BUILD_VER=`echo $SYNOPKG_OLD_PKGVER| cut -d- -f2`
if [ -n "$BUILD_VER" -a "$BUILD_VER" -lt 9 ]; then
	python -m json.tool < $IMG_DESC| sed 's,\([^:]*\):[^"]*\(.*\),\1\2,g' > $IMG_DESC.tmp
	mv -f $IMG_DESC.tmp $IMG_DESC
fi
exit 0
