Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a01e9f9856 | ||
![]() |
745c7a8c9c | ||
![]() |
78e3a9af97 | ||
![]() |
97582f0381 | ||
![]() |
374df9f580 | ||
![]() |
dd7bfe3f30 | ||
![]() |
3356da8cf7 |
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -63,6 +63,7 @@
|
|||||||
"typeinfo": "cpp",
|
"typeinfo": "cpp",
|
||||||
"variant": "cpp",
|
"variant": "cpp",
|
||||||
"format": "cpp",
|
"format": "cpp",
|
||||||
"__nullptr": "cpp"
|
"__nullptr": "cpp",
|
||||||
|
"codecvt": "cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
7
bb64.cpp
7
bb64.cpp
@ -149,6 +149,8 @@ Usage:
|
|||||||
|
|
||||||
bb64 -u Updates bb64 to the latest version (uses docker)
|
bb64 -u Updates bb64 to the latest version (uses docker)
|
||||||
|
|
||||||
|
bb64 -v Prints the version number
|
||||||
|
|
||||||
)" << std::endl;
|
)" << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -159,6 +161,11 @@ Usage:
|
|||||||
{
|
{
|
||||||
if (mode == "-u")
|
if (mode == "-u")
|
||||||
return update_bb64();
|
return update_bb64();
|
||||||
|
else if (mode == "-v")
|
||||||
|
{
|
||||||
|
std::cout << VERSION << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
else if (mode == "-e")
|
else if (mode == "-e")
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
|
7
build.sh
7
build.sh
@ -8,12 +8,7 @@ mkdir -p "$OUTPUT_DIR"
|
|||||||
# Build for x86_64 with musl static linking
|
# Build for x86_64 with musl static linking
|
||||||
if [[ $(uname -m) == "x86_64" ]]; then
|
if [[ $(uname -m) == "x86_64" ]]; then
|
||||||
echo "Building for x86_64 (musl static)..."
|
echo "Building for x86_64 (musl static)..."
|
||||||
if command -v x86_64-linux-musl-g++ &>/dev/null; then
|
x86_64-linux-musl-g++ -O2 -static -o "$OUTPUT_DIR/bb64.amd64" bb64.cpp b64ed.cpp
|
||||||
x86_64-linux-musl-g++ -O2 -static -o "$OUTPUT_DIR/bb64.amd64" bb64.cpp b64ed.cpp
|
|
||||||
else
|
|
||||||
g++ -O2 -static -o "$OUTPUT_DIR/bb64.amd64" bb64.cpp b64ed.cpp -static-libgcc -static-libstdc++
|
|
||||||
echo "Warning: musl-g++ not found, built with g++ static flags."
|
|
||||||
fi
|
|
||||||
echo "Built bb64.amd64 (x86_64, static)"
|
echo "Built bb64.amd64 (x86_64, static)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
14
install.sh
14
install.sh
@ -24,7 +24,7 @@ fi
|
|||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
CHOWN_USER="$2"
|
CHOWN_USER="$2"
|
||||||
if [[ -z "$CHOWN_USER" ]]; then
|
if [[ -z "$CHOWN_USER" ]]; then
|
||||||
CHOWN_USER=$USER
|
CHOWN_USER=$(id -u)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 1. Determine architecture
|
# 1. Determine architecture
|
||||||
@ -61,9 +61,9 @@ rm "$TMPDIR/bb64"
|
|||||||
# 6. Print success message
|
# 6. Print success message
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
echo "bb64 installed successfully to $INSTALL_DIR/bb64 (arch $ARCH)"
|
echo "bb64 installed successfully to $INSTALL_DIR/bb64 (arch $ARCH)"
|
||||||
echo " "
|
# echo " "
|
||||||
echo "Update bb64 with:"
|
# echo "Update bb64 with:"
|
||||||
echo " bb64 -u"
|
# echo " bb64 -u"
|
||||||
echo " "
|
# echo " "
|
||||||
echo "try it out with:"
|
# echo "try it out with:"
|
||||||
echo " bb64 ZWNobyAiSGVsbG8td29ybGQhIGJiNjQgaXMgd29ya2luZy4i"
|
# echo " bb64 ZWNobyAiSGVsbG8td29ybGQhIGJiNjQgaXMgd29ya2luZy4i"
|
||||||
|
@ -17,8 +17,9 @@ if [ ! -f version.h ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
v=$(cat version.h | grep -o 'static const char \*VERSION = "[0-9.]*";' | cut -d'"' -f2)
|
v=$(cat version.h | grep -o 'static const char \*VERSION = "[0-9.]*";' | cut -d'"' -f2)
|
||||||
|
oldv=$v
|
||||||
v=$((v+1))
|
v=$((v+1))
|
||||||
echo "Incrementing version from $v to $v" >&2
|
echo "Incrementing version from $oldv to $v" >&2
|
||||||
echo "static const char *VERSION = \"$v\";" > version.h
|
echo "static const char *VERSION = \"$v\";" > version.h
|
||||||
fi
|
fi
|
||||||
TAG="v$v"
|
TAG="v$v"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user