mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
382b4f9786
so do the `cp -r` just like the checkinstall part does
27 lines
756 B
Bash
Executable File
27 lines
756 B
Bash
Executable File
#!/bin/bash
|
|
VERSION=23.3
|
|
|
|
mkdir /tmp/protoc-install
|
|
pushd /tmp/protoc-install
|
|
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v$VERSION/protoc-$VERSION-linux-x86_64.zip
|
|
unzip protoc-$VERSION-linux-x86_64.zip
|
|
if [ "$EUID" -ne 0 ]; then
|
|
if command -v checkinstall &> /dev/null; then
|
|
sudo checkinstall --pkgversion=$VERSION -y cp -r bin include /usr/local/
|
|
cp *.deb ~
|
|
else
|
|
sudo cp -r bin include /usr/local/
|
|
fi
|
|
popd
|
|
sudo rm -rf /tmp/protoc-install
|
|
else
|
|
if command -v checkinstall &> /dev/null; then
|
|
checkinstall --pkgversion=$VERSION -y cp -r bin include /usr/local/
|
|
cp *.deb ~
|
|
else
|
|
cp -r bin include /usr/local/
|
|
fi
|
|
popd
|
|
rm -rf /tmp/protoc-install
|
|
fi
|