Skip to content

Commit 80dacc9

Browse files
feat: bash alias and environment variable set
1 parent 3745bf0 commit 80dacc9

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

Diff for: aliases

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
AR_ROOT=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
4+
5+
# catkin workspace alias
6+
alias AR_source="source ${AR_ROOT}/ar_environment.sh"
7+
alias AR_clean="cd ${AR_ROOT}/build && make clean"
8+
alias AR_build="cd ${AR_ROOT} && rm -f -r build && mkdir build && cd build && cmake .."
9+
alias AR_make="cd ${AR_ROOT}/build && make"
10+
alias AR_cd="cd ${AR_ROOT}"

Diff for: environment.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
#THIS SCRIPT SHOULD RUN AFTER environment.sh contained in AppliedRoboticsEncironment folder
4+
CATKIN_SHELL=bash
5+
6+
printf "* StudentInterface/environment.sh\n"
7+
if [ -z "$AR_ROOT" ]
8+
then
9+
if [ -z "$AR_CATKIN_ROOT" ]
10+
then
11+
printf "\t* \e[31mERROR. Did you source the environment in AppliedRoboticsEnvironment?\e[0m\n"
12+
else
13+
source "$(dirname "${BASH_SOURCE[0]}" )/aliases"
14+
printf "\t\t* \e[32m DONE!\n\e[0m"
15+
fi
16+
else
17+
printf "\t*\e[33m Seems that you already source this environment.\e[0m\n"
18+
fi
19+
20+
21+
22+

0 commit comments

Comments
 (0)