2 # extract metainfo/manifest to /var/pkgmgr/packagename/metainfo/manifest
8 echo "package path is "$1"" > /tmp/nativescriptlog
11 echo "current dir is $CURDIR" >> /tmp/nativescriptlog
14 echo ">>$DEBUG" >> /tmp/nativescriptlog
18 DEBUG="Usage: extract_manifest.sh PKG_FILE";debug
23 DEBUG="File not found";debug
24 exit $E_FILE_NOT_FOUND
28 PKGFILENAME="${PKGFILEPATH##*/}"
31 TEMPDIR=/opt/ums/nativeinstaller/"$PKGFILENAME"-temp
32 echo "$TEMPDIR" >> /tmp/nativescriptlog
35 echo "pkg file path = "$PKGFILEPATH"" >> /tmp/nativescriptlog
36 cp "$PKGFILEPATH" "$TEMPDIR"/
40 echo "filename = "$filename"" >> /tmp/nativescriptlog
44 echo "retval = $retval" >> /tmp/nativescriptlog
46 if [ $retval -ne 0 ];then
47 DEBUG="archive Not correct";debug
50 exit $E_NOT_VALID_ARCHIVE
53 CHECK_MANIFEST=`tar -tf control.tar.gz | grep control/*`
54 echo $CHECK_MANIFEST >> /tmp/nativescriptlog
56 DEBUG="No manifest";debug
62 mkdir -p /var/pkgmgr/"$PKGFILENAME"/metainfo
63 tar -zxf control.tar.gz $CHECK_MANIFEST
64 mv $CHECK_MANIFEST /var/pkgmgr/"$PKGFILENAME"/metainfo