This commit is contained in:
2021-08-02 09:42:03 +08:00
parent 46b5976290
commit 7b01dc91ef
4 changed files with 6577 additions and 6567 deletions

View File

@@ -1,9 +1,16 @@
#!/bin/bash
if [[ ${1} == "configure" && ! -d "build/" ]]; then
mkdir build && cd build && rm -rf * && cmake ..
elif [[ ${1} == "configure" ]]; then
cd build && rm -rf * && cmake ..
elif [[ ${1} == "build" ]]; then
cmd=${1}
package=yzToys
address=/opt
if [[ ${cmd} == "configure" && ! -d "build/" ]]; then
mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=${address}/stow/${package} -DCMAKE_BUILD_TYPE=Release
elif [[ ${cmd} == "configure" ]]; then
cd build && rm -rf * && cmake .. -DCMAKE_INSTALL_PREFIX=${address}/stow/${package} -DCMAKE_BUILD_TYPE=Release
elif [[ ${cmd} == "build" ]]; then
cd build && make
elif [[ ${cmd} == "install" ]]; then
cd build && sudo make install
sudo stow --dir=${address}/stow --target=${address} ${package}
fi