Added some scripts
This commit is contained in:
parent
b70af69038
commit
a557bb9c55
5 changed files with 105 additions and 18 deletions
17
Bin/removeMerged.sh
Executable file
17
Bin/removeMerged.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Checkout develop
|
||||
git develop
|
||||
|
||||
if [ $? = 1 ] ; then
|
||||
git checkout dev
|
||||
fi
|
||||
|
||||
# Get last changes
|
||||
git pull
|
||||
|
||||
# Get list of available remote's branch
|
||||
git fetch --prune origin
|
||||
|
||||
# List merged branch and remove it
|
||||
git branch --merged | egrep -v "(^\*|master|dev)" |xargs git branch -d
|
47
Bin/rsync.sh
47
Bin/rsync.sh
|
@ -1,17 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
TYPE='' # usb / sshfs
|
||||
CMD=rsync
|
||||
ARGS='-avz --delete --exclude /Nextcloud --exclude /.cache --exclude /.config/google-chrome-unstable --exclude /.config/google-chrome --exclude /Downloads --exclude /.thunderbird --exclude /Projects --exclude /Software --exclude /tmp --exclude /VirtualBox\ VMs'
|
||||
ARGS='-avz --delete
|
||||
--exclude /Nextcloud
|
||||
--exclude /.cache
|
||||
--exclude /Downloads
|
||||
--exclude /.thunderbird
|
||||
--exclude /Projects
|
||||
--exclude /Software
|
||||
--exclude /tmp
|
||||
--exclude /fonts
|
||||
--exclude /Music
|
||||
--exclude /node_modules
|
||||
--exclude /snap
|
||||
--exclude /.local/share/Trash
|
||||
--exclude /.npm
|
||||
--exclude /.thumbnails
|
||||
--exclude /Android
|
||||
--exclude /.AndroidStudio*
|
||||
--exclude /.android
|
||||
--exclude /.bundle/cache
|
||||
--exclude /.config/cache
|
||||
--exclude /.config/Code/Cache
|
||||
--exclude /.config/Code/CachedData
|
||||
--exclude /.config/Slack
|
||||
--exclude /.config/*/Cache
|
||||
--exclude /.config/chromium
|
||||
--exclude /.mozilla
|
||||
--exclude /.config/discord
|
||||
--exclude /.config/spotify
|
||||
--exclude /.crashlytics
|
||||
--exclude /.fastlane
|
||||
--exclude /.gradle
|
||||
--exclude /.DataGrip*'
|
||||
ORIG='/home/dbroqua/'
|
||||
DEST=''
|
||||
HOSTNAME=`hostname`
|
||||
|
@ -54,19 +76,16 @@ if [ "${TYPE}" != '' ] ; then
|
|||
usb)
|
||||
sudo cryptsetup luksOpen /dev/sdb1 backup
|
||||
sudo mount /dev/mapper/backup ${MOUNT}
|
||||
# sudo umount ${MOUNT}
|
||||
# sudo mount /dev/disk/by-uuid/${UUID} ${MOUNT}
|
||||
echo "Go !"
|
||||
if [ $? == 0 ] ; then
|
||||
${CMD} ${ARGS} ${ORIG} ${DEST}
|
||||
fi
|
||||
# sudo umount ${MOUNT}
|
||||
sudo umount ${MOUNT}
|
||||
sudo cryptsetup luksClose backup
|
||||
;;
|
||||
sshfs)
|
||||
${CMD} ${ARGS} ${ORIG} ${DEST}
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#! /bin/bash
|
||||
|
||||
|
||||
ls -1tr | grep -v files.txt > files.txt
|
||||
mencoder -nosound -noskip -oac copy -ovc copy -o output.avi -mf fps=15 'mf://@files.txt'
|
||||
ffmpeg -i output.avi -y -s hd1080 -sameq final.avi
|
||||
|
||||
rm files.txt output.avi
|
||||
mencoder -nosound -noskip -oac copy -ovc copy -o output.avi -mf fps=20 'mf://@files.txt'
|
||||
|
||||
ffmpeg -i output.avi -y -sameq -vf scale=1920:1440,crop=1920:1080 output-final.avi
|
||||
|
|
33
Bin/tunnel.sh
Executable file
33
Bin/tunnel.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#! /bin/bash
|
||||
|
||||
LOCAL_PORT=6660
|
||||
CLIENT=127.0.0.1
|
||||
REMOTE="-"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--local-port=*)
|
||||
LOCAL_PORT="${1#*=}"
|
||||
;;
|
||||
--remote=*)
|
||||
REMOTE="${1#*=}"
|
||||
;;
|
||||
--client=*)
|
||||
CLIENT="${1#*=}"
|
||||
;;
|
||||
*)
|
||||
printf "Invalid parameter $1"
|
||||
exit 1
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "${REMOTE}" = "-" ] ; then
|
||||
printf "Invalid value for --remote="
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REMOTE_SERVER=`echo ${REMOTE}|cut -d: -f1`
|
||||
REMOTE_PORT=`echo ${REMOTE}|cut -d: -f2`
|
||||
|
||||
ssh -L ${LOCAL_PORT}:${CLIENT}:${REMOTE_PORT} ${REMOTE_SERVER}
|
19
Bin/umount
Executable file
19
Bin/umount
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# A mettre dans le dossier : /lib/systemd/system-sleep
|
||||
|
||||
PATH=/bin:/usr/bin
|
||||
|
||||
case ${1} in
|
||||
pre)
|
||||
fusermount -u /home/dbroqua/Gdrive
|
||||
fusermount -u /home/dbroqua/S3FS
|
||||
umount -f /media/freebox
|
||||
umount -f /media/malpartida/dbroqua
|
||||
umount -f /media/malpartida/medias
|
||||
umount -f /media/malpartida/family
|
||||
|
||||
;;
|
||||
*)
|
||||
exit ${NA}
|
||||
esac
|
Loading…
Reference in a new issue