Kovri: refactor bin install method, add kovri-util

Also adds more feedback to windows script.

References:
- monero-project/meta#50
- monero-project/meta#35
- monero-project/kovri#362
This commit is contained in:
anonimal 2017-02-25 08:25:52 +00:00
parent 62ce073f6b
commit 2e1f6765b2
No known key found for this signature in database
GPG key ID: 66A76ECF914409F1
2 changed files with 9 additions and 8 deletions

View file

@ -82,7 +82,6 @@ REM
REM TODO(anonimal): Install to Program Files?
SET _path=%USERPROFILE%\Desktop
SET _binary=kovri.exe
IF NOT EXIST "%_data%%" (
ECHO Creating "%_data%"
@ -98,17 +97,20 @@ IF NOT EXIST "%_path%%" (
SET _resources[0]=client
SET _resources[1]=config
SET _resources[2]=%_binary%
SET _resources[2]=kovri.exe
SET _resources[3]=kovri-util.exe
FOR /F "tokens=2 delims==" %%s IN ('set _resources[') DO (
IF %%s == %_binary% (
COPY /Y %%s "%_path%"
) ELSE (
IF EXIST %%s\* (
XCOPY /F /S /E /Y %%s\* "%_data%"\%%s\*
) ELSE (
COPY /Y %%s "%_path%"
)
)
CALL :catch could not install resources
ECHO Data directory is "%_data%"
ECHO Binaries are located in "%_path%"
ECHO Installation success!
:catch

View file

@ -99,7 +99,6 @@ done
# Create new install
_path=$HOME/bin
_binary=kovri
if [[ ! -d $_data ]]; then
echo -n "Creating ${_data}"
@ -113,9 +112,9 @@ if [[ ! -d $_path ]]; then
catch "could not create $_path"
fi
_resources=(client config $_binary)
_resources=(client config kovri kovri-util)
for _i in ${_resources[@]}; do
if [[ $_i != $_binary ]]; then
if [[ -d $_i ]]; then
echo -n "Copying $_i to $_data"
cp -fR $_i "$_data"
else