diff --git a/Makefile b/Makefile index dc60334..d03228e 100755 --- a/Makefile +++ b/Makefile @@ -1,19 +1,19 @@ OS := $(shell uname) COMPILER := $(shell test "${OS}" = "Linux" -a -x "/bin/g++" && echo "_gcc") -BUILD_Darwin = clang++ procenv.cpp process.cpp -o procenv -std=c++17 -Wall -arch arm64 -arch x86_64 -BUILD_Linux_gcc = g++ procenv.cpp process.cpp -o procenv -std=c++17 -Wall -static-libgcc -static-libstdc++ -static -BUILD_Linux = clang++ procenv.cpp process.cpp -o procenv -std=c++17 -Wall -BUILD_FreeBSD = clang++ procenv.cpp process.cpp -o procenv -std=c++17 -Wall -lelf -lkvm -lpthread -static -BUILD_DragonFly = g++ procenv.cpp process.cpp -o procenv -std=c++17 -Wall -static-libgcc -static-libstdc++ -lkvm -lpthread -static -BUILD_NetBSD = g++ procenv.cpp process.cpp -o procenv -std=c++17 -Wall -static-libgcc -static-libstdc++ -lkvm -lpthread -static -BUILD_OpenBSD = clang++ procenv.cpp process.cpp -o procenv -std=c++17 -Wall -lkvm -lpthread -static -BUILD_SunOS = g++ procenv.cpp process.cpp -o procenv -std=c++17 -Wall -static-libgcc -lkvm -BUILD_Windows = g++ procenv.cpp process.cpp -o procenv.exe -std=c++17 -Wall -static-libgcc -static-libstdc++ -static -lntdll +BUILD_Darwin = clang++ envps.cpp process.cpp -o envps -std=c++17 -Wall -arch arm64 -arch x86_64 +BUILD_Linux_gcc = g++ envps.cpp process.cpp -o envps -std=c++17 -Wall -static-libgcc -static-libstdc++ -static +BUILD_Linux = clang++ envps.cpp process.cpp -o envps -std=c++17 -Wall +BUILD_FreeBSD = clang++ envps.cpp process.cpp -o envps -std=c++17 -Wall -lelf -lkvm -lpthread -static +BUILD_DragonFly = g++ envps.cpp process.cpp -o envps -std=c++17 -Wall -static-libgcc -static-libstdc++ -lkvm -lpthread -static +BUILD_NetBSD = g++ envps.cpp process.cpp -o envps -std=c++17 -Wall -static-libgcc -static-libstdc++ -lkvm -lpthread -static +BUILD_OpenBSD = clang++ envps.cpp process.cpp -o envps -std=c++17 -Wall -lkvm -lpthread -static +BUILD_SunOS = g++ envps.cpp process.cpp -o envps -std=c++17 -Wall -static-libgcc -lkvm +BUILD_Windows = g++ envps.cpp process.cpp -o envps.exe -std=c++17 -Wall -static-libgcc -static-libstdc++ -static -lntdll BUILD = ${BUILD_${OS}${COMPILER}} -procenv: procenv.cpp process.cpp process.hpp Makefile +envps: envps.cpp process.cpp process.hpp Makefile ifeq (${BUILD},) @echo "Unsupported OS/compiler combination: ${OS}${COMPILER}" @exit 1 @@ -21,4 +21,4 @@ endif ${BUILD} clean: - rm -f procenv procenv.exe \ No newline at end of file + rm -f envps envps.exe \ No newline at end of file diff --git a/README.md b/README.md index 7b9ec3b..e7393e2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -procenv -------- +envps +----- Show process environment variables ``` -$ procenv 242 +$ envps 242 SERVICE_NAME=example PATH=/usr/bin:/bin:/usr/sbin:/sbin ``` @@ -11,10 +11,10 @@ Installation ------------ Just run `make` or install with [Homebrew](https://brew.sh/) (both Linux and macOS are supported): ``` -$ brew install henrik242/brew/procenv +$ brew install henrik242/brew/envps ``` Links ----- -* `procenv` is based on functionality from https://github.com/time-killer-games/xproc. Thanks! -* The Homebrew formula is hosted at https://github.com/henrik242/homebrew-brew/blob/main/Formula/procenv.rb +* `envps` is based on functionality from https://github.com/time-killer-games/xproc. Thanks! +* The Homebrew formula is hosted at https://github.com/henrik242/homebrew-brew/blob/main/Formula/envps.rb diff --git a/procenv.cpp b/envps.cpp similarity index 97% rename from procenv.cpp rename to envps.cpp index ee4fbe0..072ac86 100644 --- a/procenv.cpp +++ b/envps.cpp @@ -30,7 +30,7 @@ int main(int argc, char **argv) { if (argc != 2) { - std::cout << "procenv " << "\n"; + std::cout << "envps " << "\n"; return 0; } int proc_id;