Skip to content

Commit

Permalink
rename to envps
Browse files Browse the repository at this point in the history
  • Loading branch information
henrik242 committed Jan 12, 2024
1 parent 81f0fce commit cef2ada
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
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
endif
${BUILD}

clean:
rm -f procenv procenv.exe
rm -f envps envps.exe
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
procenv
-------
envps
-----
Show process environment variables
```
$ procenv 242
$ envps 242
SERVICE_NAME=example
PATH=/usr/bin:/bin:/usr/sbin:/sbin
```
Expand All @@ -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
2 changes: 1 addition & 1 deletion procenv.cpp → envps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

int main(int argc, char **argv) {
if (argc != 2) {
std::cout << "procenv <pid>" << "\n";
std::cout << "envps <pid>" << "\n";
return 0;
}
int proc_id;
Expand Down

0 comments on commit cef2ada

Please sign in to comment.