Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
fix #25
Browse files Browse the repository at this point in the history
  • Loading branch information
esm-tmori committed Sep 20, 2020
1 parent 18ccdde commit 82c8a90
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Installer/env/env.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
export OS_TYPE=`uname`
export SIM_DIR=`pwd`/simulator
export INS_DIR=`pwd`/installer
export WORK_DIR=`pwd`
export INS_DIR=${WORK_DIR}/../Installer/installer
export CFG_DIR=`pwd`/config
export ROOT_DIR=`pwd`
export EV3RT_DIR=${SIM_DIR}/ev3rt-athrill-v850e2m
Expand Down
4 changes: 3 additions & 1 deletion Installer/installer/create-project.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ then
exit 1
fi

bash installer/utils/create_empty.bash ${1}
source config/config.bash

bash ${INS_DIR}/utils/create_empty.bash ${1}

echo "### create config.json for unity"
bash config/scripts/create_config.bash ${1} unity
Expand Down
2 changes: 1 addition & 1 deletion Installer/installer/import-project.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ then
fi

echo "### Importing sample"
bash installer/utils/sample_import.bash ${1}
bash ${INS_DIR}/utils/sample_import.bash ${1}

echo "### create config.json for unity"
bash config/scripts/create_config.bash ${1} unity
Expand Down
2 changes: 1 addition & 1 deletion Installer/installer/install-single-robot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source env/env.bash

cd simulator

TOOL_DIR=../installer/utils
TOOL_DIR=${INS_DIR}/utils

which athrill2 > /dev/null
if [ $? -ne 0 ]
Expand Down
41 changes: 41 additions & 0 deletions ProjectManager/create_workspace.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

if [ $# -ne 1 ]
then
echo "Usage: $0 <workspace name>"
exit 1
fi

if [ -d Installer ]
then
:
else
echo "ERROR: can not found Installer"
exit 1
fi

WORKSPACE_NAME=${1}

function create_workspace_template()
{
if [ -d ${WORKSPACE_NAME} ]
then
echo "ERROR: ${WORKSPACE_NAME} already exists."
exit 1
fi
mkdir ${WORKSPACE_NAME}
mkdir ${WORKSPACE_NAME}/config
cp -rp Installer/config/* ${WORKSPACE_NAME}/config/
mkdir ${WORKSPACE_NAME}/env
cp -rp Installer/env/* ${WORKSPACE_NAME}/env/
mkdir ${WORKSPACE_NAME}/build
cp -rp Installer/build/* ${WORKSPACE_NAME}/build/
mkdir ${WORKSPACE_NAME}/simulator
mkdir ${WORKSPACE_NAME}/simulator/unity
mkdir ${WORKSPACE_NAME}/simulator/unity/project
mkdir ${WORKSPACE_NAME}/downloads
mkdir ${WORKSPACE_NAME}/tools
}

create_workspace_template

0 comments on commit 82c8a90

Please sign in to comment.