16 if [ ! -d $target_dir ]
18 echo "$target_dir will be created"
19 if ! mkdir -p $target_dir
21 echo "[FAIL] cannot find or create target directory: $target_dir"
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
32 ver=$(cat ./ci/package-tag.yaml | grep tag: |awk '{split($0,ver,":"); print ver[2]}'| tr -d " \t\n\r")
34 new_name=${project_name}_$ver
36 dpkg-deb --build $target_dir
39 echo "mv *.deb $new_name.deb"
40 mv *.deb $new_name.deb
41 echo "deb package is: $project_name_$ver.deb"