bb64 release v29
This commit is contained in:
parent
eb89974d78
commit
e6b84a8d8c
@ -2,10 +2,18 @@
|
|||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
|
Automated system-wide installation:
|
||||||
```
|
```
|
||||||
curl -fsSL https://gitea.jde.nz/public/bb64/releases/download/latest/install.sh | bash
|
curl -fsSL https://gitea.jde.nz/public/bb64/releases/download/latest/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## To download just the bb64 executable:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -fsSL -o bb64 https://gitea.jde.nz/public/bb64/releases/download/latest/bb64.amd64 && chmod a+x bb64
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# Use
|
# Use
|
||||||
|
|
||||||
Bash Base64, written in C++.
|
Bash Base64, written in C++.
|
||||||
|
3
bb64.cpp
3
bb64.cpp
@ -52,6 +52,7 @@ int update_bb64()
|
|||||||
{
|
{
|
||||||
// determine path to this executable
|
// determine path to this executable
|
||||||
std::filesystem::path bb64_path = std::filesystem::canonical("/proc/self/exe");
|
std::filesystem::path bb64_path = std::filesystem::canonical("/proc/self/exe");
|
||||||
|
std::filesystem::path parent_path = bb64_path.parent_path();
|
||||||
|
|
||||||
// determine the architecture of the system
|
// determine the architecture of the system
|
||||||
std::string arch = get_arch();
|
std::string arch = get_arch();
|
||||||
@ -60,7 +61,7 @@ int update_bb64()
|
|||||||
|
|
||||||
// download new version, preserve permissions and ownership
|
// download new version, preserve permissions and ownership
|
||||||
std::string bash_script;
|
std::string bash_script;
|
||||||
bash_script += "docker run --rm -v /usr/local/bin:/target";
|
bash_script += "docker run --rm -v "+parent_path.string()+":/target";
|
||||||
bash_script += " gitea.jde.nz/public/debian-curl:latest";
|
bash_script += " gitea.jde.nz/public/debian-curl:latest";
|
||||||
bash_script += " sh -c \"";
|
bash_script += " sh -c \"";
|
||||||
bash_script += " curl -fsSL " + url + " -o /target/bb64_temp &&";
|
bash_script += " curl -fsSL " + url + " -o /target/bb64_temp &&";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user