/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to build.sh

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-19 15:01:09 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210119150109-h36fjv4txv3fp2wk
removed CMake stuff

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
###
9
9
exe() { echo "\$ $@" ; "$@" ; }
10
10
 
 
11
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 
12
cd $CWD
 
13
 
11
14
show_usage () {
12
15
  echo ""
13
16
  echo "Set up the building of libssts and clean up too."
14
 
  echo "  This is not ment as a replacment for bazaar or for cmake, just a"
 
17
  echo "  This is not ment as a replacment for bazaar or for meson, just a"
15
18
  echo "  \"kick-start\" for new developers... and makes branching easier."
16
19
  echo ""
17
20
  echo "  ./build.sh clean      -  Clean up the project and build files."
44
47
}
45
48
 
46
49
do_build () {
 
50
  cd $CWD
47
51
  if ( ! -d "./build" )
48
52
  then
49
53
    exe mkdir ./build
51
55
  
52
56
  cd ./build
53
57
  
54
 
  if [ ! -f "Makefile" ]
55
 
  then
56
 
    exe cmake ..
57
 
  fi
58
 
  
59
 
  make
 
58
  if [ ! -f "build.ninja" ]
 
59
  then
 
60
    exe meson ..
 
61
  fi
 
62
  
 
63
  ninja
 
64
}
 
65
 
 
66
do_test () {
 
67
  if ( ! -d "./build" )
 
68
  then
 
69
    do_build
 
70
  fi
 
71
  
 
72
  cd $__CWD/build
 
73
  
 
74
  exe ninja test
 
75
  
60
76
}
61
77
 
62
78
do_clean () {
67
83
}
68
84
 
69
85
do_clean_tree () {
70
 
  exe bzr revert
71
 
  exe bzr clean-tree 
 
86
  exe brz revert
 
87
  exe brz clean-tree 
72
88
}
73
89
 
74
90
do_commit () {
75
 
  exe bzr commit
 
91
  exe brz commit
76
92
}
77
93
 
78
94
 
107
123
}
108
124
 
109
125
do_merge_trunk () {
110
 
  exe bzr commit
111
 
  exe bzr merge lp:simpletypesystem
 
126
  exe brz commit
 
127
  exe brz merge lp:simpletypesystem
112
128
  if [[ -z $? ]]
113
129
  then
114
130
    echo "Something went wrong with the merge! Plese solve these problems"
119
135
}
120
136
 
121
137
do_propose_merge () {
122
 
  exe bzr lp-propose-merge
 
138
  exe brz lp-propose-merge
123
139
}
124
140
 
125
141
case ${ARGV[0]} in
126
142
     "help"|"-h") show_usage ;;
127
143
     "clean"|"cl") do_clean ;;
128
144
     "build"|"bl") do_build ;;
 
145
     "test"|"tt") do_test ;;
129
146
     "clean-tree"|"ct") do_clean_tree ;;
130
147
     "commit"|"cm") do_commit ;;
131
148
     "branch"|"br") do_branch ;;
134
151
     *) show_usage ;;
135
152
esac
136
153
 
137
 
 
 
154
cd $CWD
138
155