Adding RESET connection status for E2 Reset
[ric-plt/nodeb-rnib.git] / ci / build.sh
1 #!/bin/sh
2 output_dir="/reader"
3
4 cd ./creader 
5 if [  -d $output_dir ]
6 then
7     rm -r -f $output_dir
8 fi
9
10 make
11 ls -la .$output_dir
12 cd ..
13 pwd
14 target_dir="packages"
15 project_name="rnib"
16 if [ ! -d $target_dir ]
17 then
18         echo "$target_dir will be created"
19     if ! mkdir -p $target_dir
20         then
21                 echo "[FAIL] cannot find or create target directory: $target_dir"
22                 exit 1
23         fi
24 fi
25     rm -f ./$target_dir/*.*
26     mkdir -p $target_dir/DEBIAN
27     mkdir -p $target_dir/usr/local/include/$project_name/
28     echo "cp -f -r ./creader/$output_dir/* $target_dir/usr/local/include/$project_name"
29     cp -f -r ./creader/$output_dir/* $target_dir/usr/local/include/$project_name
30     cp ./ci/control $target_dir/DEBIAN
31     
32      ver=$(cat ./ci/package-tag.yaml | grep tag: |awk '{split($0,ver,":"); print ver[2]}'| tr -d " \t\n\r")
33      echo $project_name 
34      new_name=${project_name}_$ver
35      echo $new_names
36      dpkg-deb --build $target_dir
37      mkdir -p /export
38     
39      echo "mv *.deb $new_name.deb"
40      mv *.deb  $new_name.deb
41      echo "deb package is: $project_name_$ver.deb"
42     
43     ls -al *.deb