Update 2024-12-23 14:32 OpenBSD/amd64-t14
This commit is contained in:
parent
19fc60ef8b
commit
ae5183fa58
27
.bin/cam
27
.bin/cam
@ -9,20 +9,21 @@ for arg in $@
|
|||||||
do
|
do
|
||||||
# set values based of arguments found
|
# set values based of arguments found
|
||||||
case $arg in
|
case $arg in
|
||||||
s|start) shift; _start=1 ;;
|
s|start) _start=1 ;;
|
||||||
k|kill|stop) shift; _stop=1 ;;
|
k|kill|stop) _stop=1 ;;
|
||||||
l|list) shift; _list=1 ;;
|
l|list) _list=1 ;;
|
||||||
30) shift; _fps="-framerate 30" ;;
|
30) _fps="-framerate 30" ;;
|
||||||
60) shift; _fps="-framerate 60" ;;
|
60) _fps="-framerate 60" ;;
|
||||||
raw) shift; _format="-input_format yuyv422" ;;
|
raw) _format="-input_format yuyv422" ;;
|
||||||
fullhd) shift; _res="-video_size 1920x1080" ;;
|
fullhd) _res="-video_size 1920x1080" ;;
|
||||||
hd) shift; _res="-video_size 1280x720" ;;
|
hd) _res="-video_size 1280x720" ;;
|
||||||
sd) shift; _res="-video_size 640x360" ;;
|
sd) _res="-video_size 640x360" ;;
|
||||||
max) shift; _res="max" ;;
|
max) _res="max" ;;
|
||||||
[0-9]*x[0-9]*) shift; _res="-video_size $arg" ;;
|
[0-9]*x[0-9]*) _res="-video_size $arg" ;;
|
||||||
[0-9]) shift; _dev="$arg" ;;
|
[0-9]) _dev="$arg" ;;
|
||||||
*) shift; _unknown="$_unknown $arg" ;;
|
*) _unknown="$_unknown $arg" ;;
|
||||||
esac
|
esac
|
||||||
|
shift;
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -z "$_unknown" ]
|
if [ ! -z "$_unknown" ]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
case $1 in
|
case "$1" in
|
||||||
put|push) shift; rsync -rv --progress --append-verify $@ osmc:/media/USBDisk/ ;;
|
put|push) shift; rsync -rv --progress --append-verify $@ osmc:/media/USBDisk/ ;;
|
||||||
df) shift; ssh osmc "df -h /media/USBDisk/" ;;
|
df) shift; ssh osmc "df -h /media/USBDisk/" ;;
|
||||||
ls) shift; ssh osmc "cd /media/USBDisk/ && ls $@ | grep -v lost+found" ;;
|
ls) shift; ssh osmc "cd /media/USBDisk/ && ls $@ | grep -v lost+found" ;;
|
||||||
|
58
.bin/upload
58
.bin/upload
@ -1,21 +1,57 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
if [ x"$1" == x"rm" ]
|
for arg in "$@"
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
sh) _ext=".sh" ;;
|
||||||
|
ksh) _ext=".ksh" ;;
|
||||||
|
txt) _ext=".txt" ;;
|
||||||
|
log) _ext=".log" ;;
|
||||||
|
rm) _rm=1 ;;
|
||||||
|
ls) _ls=1 ;;
|
||||||
|
mv) _mv=1 ;;
|
||||||
|
*) break; ;;
|
||||||
|
esac
|
||||||
|
shift;
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -z "$_rm" ]
|
||||||
then
|
then
|
||||||
shift
|
for file in "$@"
|
||||||
for file in $@
|
|
||||||
do
|
do
|
||||||
ssh sdk@codevoid.de "cd /home/www/htdocs/ptrace/paste/ && rm -v $(basename "$file")" || true
|
ssh sdk@codevoid.de \
|
||||||
|
"cd /home/www/htdocs/ptrace/paste/ \
|
||||||
|
&& rm -v $(basename "$file")" \
|
||||||
|
|| true
|
||||||
done
|
done
|
||||||
elif [ x"$1" == x"ls" ]
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$_ls" ]
|
||||||
then
|
then
|
||||||
shift
|
ssh sdk@codevoid.de \
|
||||||
ssh sdk@codevoid.de "cd /home/www/htdocs/ptrace/paste/ && ls -1 | xargs -n1 -I{} echo https://ptrace.org/{}"
|
"cd /home/www/htdocs/ptrace/paste/ \
|
||||||
else
|
&& ls -1tr \
|
||||||
for file in $@
|
| xargs -n1 -I{} echo \"https://ptrace.org/{} ({})\""
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$_mv" ]
|
||||||
|
then
|
||||||
|
ssh sdk@codevoid.de \
|
||||||
|
"cd /home/www/htdocs/ptrace/paste/ \
|
||||||
|
&& mv -v \"$1\" \"$2\""
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$@" ]
|
||||||
|
then
|
||||||
|
for file in "$@"
|
||||||
do
|
do
|
||||||
chmod o+rw,g+r "$file"
|
# make sure the file is least owner rw and group r
|
||||||
scp "$file" sdk@codevoid.de:/home/www/htdocs/ptrace/paste/
|
# the sticky bit in the destiation folder will assign user+group
|
||||||
|
chmod u+rw,g+r "$file"
|
||||||
|
scp "$file" "sdk@codevoid.de:/home/www/htdocs/ptrace/paste/${file}${_ext}"
|
||||||
echo "https://ptrace.org/$(basename "$file")" \
|
echo "https://ptrace.org/$(basename "$file")" \
|
||||||
| sed 's/ /%20/g' \
|
| sed 's/ /%20/g' \
|
||||||
| xclip -f -r
|
| xclip -f -r
|
||||||
|
Loading…
Reference in New Issue
Block a user