bin: adjust pbcopy/pbpaste for BSD/Linux/mac

This commit is contained in:
2024-11-12 10:00:18 +00:00
parent 96c9025e67
commit 3ed2b31213
2 changed files with 14 additions and 6 deletions

View File

@@ -1,5 +1,9 @@
#!/bin/sh
if [ "$(uname)" != "Linux" ] ; then
/usr/bin/pbcopy $*
OS=$(uname)
if [ "$OS" == "Linux" -o "$OS" == "FreeBSD" ] ; then
xsel -i -b
elif [ "$(uname)" == "Darwin" ] ; then
/usr/bin/pbcopy $*
else
echo "Unknown OS."
fi
xsel -i -b

View File

@@ -1,5 +1,9 @@
#!/bin/sh
if [ "$(uname)" != "Linux" ] ; then
/usr/bin/pbpaste $*
OS=$(uname)
if [ "$OS" == "Linux" -o "$OS" == "FreeBSD" ] ; then
xsel -o -b
elif [ "$(uname)" == "Darwin" ] ; then
/usr/bin/pbpaste $*
else
echo "Unknown OS."
fi
xsel -o -b