Diff

Differences From Artifact [22eddb5383]:

To Artifact [d5deebecbf]:


    32     32   	pkgfile="$1"
    33     33   else
    34     34   	mode='dir'
    35     35   
    36     36   	pkgsdir="$1"
    37     37   fi
    38     38   appfsdir="$2"
           39  +sitekey="$3"
           40  +sitecert="$4"
    39     41   
    40         -shift; shift
           42  +if [ -n "${sitekey}" ]; then
           43  +	sitekey="$(readlink -f "${sitekey}")"
           44  +fi
           45  +
           46  +if [ -n "${sitecert}" ]; then
           47  +	sitecert="$(readlink -f "${sitecert}")"
           48  +fi
    41     49   
    42     50   if [ -z "${pkgsdir}" -a -z "${pkgfile}" ] || [ -z "${appfsdir}" ]; then
    43     51   	echo 'Usage: appfs-mk {--cpio <pkgfile>|<pkgsdir>} <appfsdir> [<site-key> [<site-certificate>]]' >&2
    44     52   
    45     53   	exit 1
    46     54   fi
    47     55   
................................................................................
   245    253   else
   246    254   	indexfile="${appfsdir}/index.new"
   247    255   fi
   248    256   
   249    257   echo "${packagelistfile_hash},sha1" > "${indexfile}"
   250    258   
   251    259   if [ -x "$(which 'appfs-cert' 2>/dev/null)" ]; then
   252         -	appfs-cert sign-site "${indexfile}" "$@"
          260  +	appfs-cert sign-site "${indexfile}" "${sitekey}" "${sitecert}"
   253    261   fi
   254    262   
   255    263   if [ -z "$APPFS_SIGN_IN_PLACE" ]; then
   256    264   	mv "${indexfile}" "${appfsdir}/index"
   257    265   fi
   258    266   
   259    267   case "${mode}" in
   260    268   	file)
   261    269   		cd /
   262    270   		rm -rf "${workdir}"
   263    271   		;;
   264    272   esac