add sh to gitignore

This commit is contained in:
张壹 2022-03-06 18:20:47 +08:00
parent e0fe71ff81
commit b203bc87fc
2 changed files with 19 additions and 1 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
build/ build/
*.sh

17
my_config.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
cmd=${1}
package=netcdfcxx_legacy
address=/opt/stow
taress=/usr/local
if [[ ${cmd} == "configure" && ! -d "build/" ]]; then
mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=${address}/${package} -DCMAKE_BUILD_TYPE=Release
elif [[ ${cmd} == "configure" ]]; then
cd build && rm -rf * && cmake .. -DCMAKE_INSTALL_PREFIX=${address}/${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} --target=${taress} ${package}
fi