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