]> Git Repo - VerusCoin.git/blame - makeReleaseMac.sh
Fixed upgrade script
[VerusCoin.git] / makeReleaseMac.sh
CommitLineData
3412ed51 1#!/bin/sh
17eb3699 2
522c4984
AD
3KMD_DIR=verus-cli
4mkdir ${KMD_DIR}
5
08682464 6cp src/fiat/verus \
522c4984
AD
7 src/verusd \
8 doc/man/verus-cli/mac/README.txt \
9 zcutil/fetch-params.sh \
8eafa6ab 10 zcutil/upgrade-agama.sh \
522c4984
AD
11 verus-cli
12mv verus-cli/fetch-params.sh verus-cli/fetch-params
13chmod +x ${KMD_DIR}/fetch-params
14chmod +x ${KMD_DIR}/verus
15chmod +x ${KMD_DIR}/verusd
25b28724 16chmod +x ${KMD_DIR}/upgrade-agama.sh
c2d0ef72 17
f60687ca 18binaries=("komodo-cli" "komodod")
c444a898 19alllibs=()
f60687ca
DD
20for binary in "${binaries[@]}";
21do
c2d0ef72 22 # do the work in the destination directory
522c4984 23 cp src/${binary} ${KMD_DIR}
c2d0ef72 24 # find the dylibs to copy for komodod
522c4984
AD
25 DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
26 echo "copying ${DYLIBS} to ${KMD_DIR}"
f60687ca 27 # copy the dylibs to the srcdir
522c4984 28 for dylib in ${DYLIBS}; do cp -rf ${dylib} ${KMD_DIR}; done
f60687ca 29done
464a17ce 30
c1dfcf84 31libraries=("libgcc_s.1.dylib" "libgomp.1.dylib" "libidn2.0.dylib" "libstdc++.6.dylib")
464a17ce
DD
32
33for binary in "${libraries[@]}";
34do
7f21e751 35 # find the dylibs to copy for komodod
522c4984
AD
36 DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
37 echo "copying ${DYLIBS} to ${KMD_DIR}"
464a17ce 38 # copy the dylibs to the srcdir
522c4984 39 for dylib in ${DYLIBS}; do cp -rf ${dylib} ${KMD_DIR}; alllibs+=(${dylib}); done
464a17ce
DD
40done
41
17eb3699 42indirectlibraries=("libintl.8.dylib" "libunistring.2.dylib")
464a17ce 43
e3938c8e 44for binary in "${indirectlibraries[@]}";
464a17ce
DD
45do
46 # Need to undo this for the dylibs when we are done
522c4984 47 chmod 755 src/${binary}
464a17ce 48 # find the dylibs to copy for komodod
522c4984
AD
49 DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
50 echo "copying indirect ${DYLIBS} to ${KMD_DIR}"
c2d0ef72 51 # copy the dylibs to the dest dir
522c4984 52 for dylib in ${DYLIBS}; do cp -rf ${dylib} ${KMD_DIR}; alllibs+=(${dylib}); done
c444a898
DD
53done
54
55for binary in "${binaries[@]}";
56do
e3938c8e 57 # modify komodod to point to dylibs
522c4984 58 echo "modifying ${binary} to use local libraries"
c2d0ef72 59 for dylib in "${alllibs[@]}"
238baa09 60 do
522c4984
AD
61 echo "Next lib is ${dylib} "
62 install_name_tool -change ${dylib} @executable_path/`basename ${dylib}` ${KMD_DIR}/${binary}
c71c9923 63 done
522c4984 64 chmod +x ${KMD_DIR}/${binary}
c71c9923 65done
c2d0ef72 66
c71c9923
DD
67for binary in "${libraries[@]}";
68do
69 # modify libraries to point to dylibs
522c4984 70 echo "modifying ${binary} to use local libraries"
c71c9923
DD
71 for dylib in "${alllibs[@]}"
72 do
522c4984
AD
73 echo "Next lib is ${dylib} "
74 install_name_tool -change ${dylib} @executable_path/`basename ${dylib}` ${KMD_DIR}/${binary}
c2d0ef72 75 done
464a17ce 76done
c71c9923
DD
77
78
This page took 0.038033 seconds and 4 git commands to generate.