sane-scripts: lift sane-ip-check
out of resholve
This commit is contained in:
@@ -26,7 +26,6 @@ let
|
||||
# see: <https://github.com/abathur/resholve/issues/26>
|
||||
"bin"
|
||||
coreutils-full
|
||||
curl
|
||||
file
|
||||
findutils
|
||||
gnugrep
|
||||
@@ -39,6 +38,7 @@ let
|
||||
oath-toolkit
|
||||
openssh
|
||||
openssl
|
||||
py-scripts.ip-check
|
||||
rmlint
|
||||
rsync
|
||||
ssh-to-age
|
||||
@@ -157,6 +157,11 @@ let
|
||||
src = ./src;
|
||||
pkgs = [ "git" ];
|
||||
};
|
||||
ip-check = static-nix-shell.mkBash {
|
||||
pname = "sane-ip-check";
|
||||
src = ./src;
|
||||
pkgs = [ "curl" "gnugrep" ];
|
||||
};
|
||||
ip-check-upnp = static-nix-shell.mkPython3Bin {
|
||||
pname = "sane-ip-check-upnp";
|
||||
src = ./src;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl -p gnugrep
|
||||
ip=$(curl --silent https://ipinfo.io/ip)
|
||||
echo "$ip" | grep -P " *^\d+\.\d+\.\d+\.\d+ *$"
|
||||
exit $?
|
||||
|
Reference in New Issue
Block a user