File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -79,23 +79,25 @@ def repackage_dependency(dep)
7979 note "Packaging #{ dep . name } …"
8080
8181 FileUtils . mkdir ( TARGET_FRAMEWORKS_PATH ) unless Dir . exist? ( TARGET_FRAMEWORKS_PATH )
82+ packaged_path = File . join ( TARGET_FRAMEWORKS_PATH , dep . name )
8283
8384 case dep . type
8485 when ".dylib"
85- if File . exist? ( File . join ( TARGET_FRAMEWORKS_PATH , dep . name ) )
86+ if File . exist? packaged_path
8687 warn "#{ dep . path } already in Frameworks directory, removing"
87- FileUtils . rm File . join ( TARGET_FRAMEWORKS_PATH , dep . name )
88+ FileUtils . rm packaged_path
8889 end
8990
9091 note "Copying #{ dep [ :path ] } to TARGET_FRAMEWORKS_PATH"
9192 FileUtils . cp dep [ :path ] , TARGET_FRAMEWORKS_PATH
93+ FileUtils . chmod "u=rw" , packaged_path
9294
9395 out = `install_name_tool -change #{ dep . path } "@rpath/#{ dep . name } " #{ dep . executable } `
9496 if $? != 0
9597 err "install_name_tool failed with error #{ $?} :\n #{ out } "
9698 end
9799
98- dep . path = File . join ( TARGET_FRAMEWORKS_PATH , dep . name )
100+ dep . path = packaged_path
99101 dep . install_name = "@rpath/#{ dep . name } "
100102 dep . is_packaged = true
101103 else
You can’t perform that action at this time.
0 commit comments