magtet/config.sh

16 lines
556 B
Bash
Raw Permalink Normal View History

2021-07-18 09:00:14 +08:00
#!/bin/bash
2021-08-02 09:42:03 +08:00
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
2021-07-18 09:00:14 +08:00
cd build && make
2021-08-02 09:42:03 +08:00
elif [[ ${cmd} == "install" ]]; then
cd build && sudo make install
sudo stow --dir=${address}/stow --target=${address} ${package}
2021-07-18 09:00:14 +08:00
fi