Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_tui/build

581 bytes, 1 run, executable

created by r1870400018:4665, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1#!/bin/bash
2
3app="ironic"
4# Default to debug unless release specified
5profile="debug"
6build_flag=""
7
8clear
9# Check if release argument provided
10if [ $# -eq 1 ]; then
11 if [ "$1" == "release" ]; then
12 profile="release"
13 build_flag="--release"
14 else
15 echo "Error: only valid argument is 'release'"
16 exit 1
17 fi
18fi
19
20rm -f ./$app
21
22# Run cargo build
23cargo build $build_flag
24
25# If build successful, copy executable
26if [ $? -eq 0 ]; then
27 cp "../target/$profile/$app" .
28 echo "Copied $app from ../target/$profile/"
29else
30 echo "Build failed"
31 exit 1
32fi