Initial import

This commit is contained in:
JPT committed 2017-03-31 13:54:00 +02:00
commit 7bc6d729f7
18 files changed
+238

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
sudo pacman -Syu --noconfirm
pacaur -Syau --noconfirm --noedit
sudo pacman -Syu --noconfirm
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
rsync --recursive --times --update --delete-after --force --progress rsync://192.168.0.106/music /media/Daten/Media/Musik/
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
rsync --recursive --times --update --delete-after --force --progress /media/Daten/Media/Musik/ jpt@backup.jpt.lu:/home/jpt/Music/
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
rsync --recursive --times --update --delete-after --force --progress /media/Daten/Media/Musik/ rsync://192.168.0.106/music
Executable
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
USAGE="Usage: $0 target file1 file2 file3 ..."
if [ "$#" == "0" ]; then
echo "$USAGE"
echo
exit 1
fi
TARGET=$1
shift
while (( "$#" )); do
echo "Copying '$1' to '$TARGET'."
rsync --inplace --recursive --progress "$1" "$TARGET"
shift
done
Executable
+54
View File
@@ -0,0 +1,54 @@
#!/bin/bash
# Base wget command
BASE_CMD="wget -r -c --no-host-directories --no-parent --reject='index.html*'"
# Let's get the URL first
if [ "$1" == "" ]; then
echo "No url given!" >&2
exit 1
else
PARAM_URL="'$1'"
shift
fi
# Collect non-essential parameters and build the final command to run
FINAL_CMD="$BASE_CMD"
# Collect rate limit
if [ "$1" != "" ]; then
PARAM_LIMIT="--limit-rate='$1'"
FINAL_CMD="$FINAL_CMD $PARAM_LIMIT"
fi
shift
# Collect user + pass, error out if one is missing
if [ "$1" != "" ]; then
PARAM_USER="--user='$1'"
shift
# Collect password, too
if [ "$1" == "" ] ; then
echo "User given, but password missing?!" >&2
exit 1
else
PARAM_PASS="--password='$1'"
fi
FINAL_CMD="$FINAL_CMD $PARAM_USER $PARAM_PASS"
fi
shift
# Append URL and that's it.
FINAL_CMD="$FINAL_CMD $PARAM_URL"
# Debug output
echo "-------------------------------------"
echo "PARAM_LIMIT: $PARAM_LIMIT"
echo "PARAM_USER: $PARAM_USER"
echo "PARAM_PASS: $PARAM_PASS"
echo "PARAM_URL: $PARAM_URL"
echo "-------------------------------------"
echo "Running command: $FINAL_CMD"
echo "-------------------------------------"
echo ""
eval $FINAL_CMD
Executable
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
FILE=$1
if [ "$FILE" = "" ]; then
echo "Usage: $0 <file>" >&2
exit 1
else
curl -F "file=@$FILE" https://x0.at/
fi
echo ""