File tree Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change 86
86
# FIXME This works on Ubuntu, may not on other distros. FIXME
87
87
export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
88
88
89
- export PS1='labenv(HiPEAC) (ibex-demo-system) \$ '
89
+ if [ -z "$DIRENV_IN_ENVRC" ]; then
90
+ export PS1='labenv(HiPEAC) (ibex-demo-system) \$ '
91
+
92
+ echo
93
+ echo
94
+ cat ./data/lowrisc.art
95
+ fi
90
96
91
- echo
92
- echo
93
- cat ./data/lowrisc.art
94
97
echo "---------------------------------------------------"
95
98
echo "Welcome to the 'ibex-demo-system' nix environment!"
96
99
echo "---------------------------------------------------"
97
100
98
- helpstr=$( cat <<'EOF'
101
+ helpme(){ cat <<'EOF'
99
102
100
103
Build ibex software :
101
104
mkdir sw/c/build && pushd sw/c/build && cmake ../ && make && popd
115
118
Connect gdb to a running program on the FPGA (In a different terminal to the OpenOCD instance):
116
119
riscv32-unknown-elf-gdb -ex "target extended-remote localhost:3333" ./sw/c/build/demo/hello_world/demo
117
120
121
+ EOF
122
+
123
+ if [ -z "$DIRENV_IN_ENVRC" ]; then
124
+ cat <<'EOF'
118
125
To leave the environment:
119
126
exit
120
127
121
128
EOF
122
- )
123
- helpme(){ echo "$helpstr"; }
129
+ fi
130
+ }
131
+
124
132
helpme
125
133
126
- echo
127
- echo "Run 'helpme' in your shell to see this message again."
128
- echo
134
+ if [ -z "$DIRENV_IN_ENVRC" ]; then
135
+ echo
136
+ echo "Run 'helpme' in your shell to see this message again."
137
+ echo
138
+ fi
129
139
'' ;
130
140
} ;
131
141
formatter = pkgs . alejandra ;
You can’t perform that action at this time.
0 commit comments