-
Notifications
You must be signed in to change notification settings - Fork 39
/
DockerAlternative.sh
executable file
·46 lines (34 loc) · 997 Bytes
/
DockerAlternative.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
function init
{
# ALTERNATIVE_PATH
export ALTERNATIVE_HOME=`pwd`
# ALTERNATIVE_BIN_PATH
export ALTERNATIVE_BIN_PATH=$ALTERNATIVE_HOME/AlterNative.Core.bin/bin/Debug
# ALTERNATIVE_BIN_PATH
export ALTERNATIVE_BIN=$ALTERNATIVE_HOME/AlterNative.Core.bin/bin/Debug/AlterNative.Core.exe
# CPP_LIB_PATH
export ALTERNATIVE_CPP_LIB_PATH=$ALTERNATIVE_HOME/Lib
# ALTERNATIVE_TOOLS
export ALTERNATIVE_TOOLS_PATH=$ALTERNATIVE_HOME/Tools
# Shell Scripts
export PATH=$PATH:$ALTERNATIVE_HOME/Tools/ShellScripts
chmod +x $ALTERNATIVE_HOME/Tools/ShellScripts/alternative
}
function decompile
{
echo "Decompiling assembly " $1
cd /executables
alternative $1 $1-output/
}
function compile
{
echo "Compiling assembly " $1
cd /executables
alternative make $1-output/
}
echo "Starting AlterNative Container Command"
echo "Usage: docker.io run -v /executables:/executables -i -t alternative BINARYNAME"
init
decompile $1
compile $1