mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +03:00
add helper script to sign app bundle
This commit is contained in:
parent
fee9616708
commit
d52d32f1b3
1 changed files with 20 additions and 0 deletions
20
admin/osx/sign_dmg.sh
Executable file
20
admin/osx/sign_dmg.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
[ "$#" -lt 2 ] && echo "Usage: sign_dmg.sh <dmg> <identity>" && exit
|
||||
|
||||
src_dmg=$1
|
||||
tmp_dmg=writable_$1
|
||||
signed_dmg=signed_$1
|
||||
identity=$2
|
||||
mount="/Volumes/$(basename $src_dmg|cut -d"-" -f1)"
|
||||
|
||||
test -e $tmp_dmg && rm -rf $tmp_dmg
|
||||
hdiutil convert $src_dmg -format UDRW -o $tmp_dmg
|
||||
open $tmp_dmg
|
||||
sleep 2s
|
||||
pushd $mount
|
||||
codesign -s "$identity" $mount/*.app
|
||||
popd
|
||||
diskutil eject $mount
|
||||
test -e $signed_dmg && rm -rf $signed_dmg
|
||||
hdiutil convert $tmp_dmg -format UDBZ -o $signed_dmg
|
Loading…
Reference in a new issue