Eliminados scripts no reutilizables
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## usage
|
## usage
|
||||||
USAGE="USAGE:
|
USAGE="USAGE:
|
||||||
$(basename "$0") source_file dest_dir
|
$(basename "$0") source_file dest_dir"
|
||||||
readonly USAGE
|
readonly USAGE
|
||||||
|
|
||||||
function help_message() {
|
function help_message() {
|
||||||
|
|||||||
+2
-2
@@ -37,8 +37,8 @@ if ! test -d "${TARGET}"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## create zip file
|
## create zip file
|
||||||
NAME=$(basename "${SOURCE}")
|
#NAME=$(basename "${SOURCE}")
|
||||||
filename=$(basename -- "$SOURCE")
|
filename=$(basename -- "$SOURCE")
|
||||||
extension="${filename##*.}"
|
#extension="${filename##*.}"
|
||||||
filename="${filename%.*}"
|
filename="${filename%.*}"
|
||||||
7z a -tzip -mx=9 "${TARGET}"/"${filename}".zip "${SOURCE}"
|
7z a -tzip -mx=9 "${TARGET}"/"${filename}".zip "${SOURCE}"
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
## Mueve todos los elementos de la carpeta donde se ejecuta a subcarpetas
|
||||||
|
## basado en la primera letra de cada elemento
|
||||||
|
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
shopt -s nocaseglob
|
shopt -s nocaseglob
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#sony.europe
|
|
||||||
find ~/downloads/psx/europe -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/europe/ \;
|
|
||||||
|
|
||||||
#sony.usa
|
|
||||||
find ~/downloads/psx/usa -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/usa/ \;
|
|
||||||
|
|
||||||
#sony.japan
|
|
||||||
find ~/downloads/psx/japan -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/japan/ \;
|
|
||||||
|
|
||||||
#sony.psp
|
|
||||||
find ~/downloads/psp -type f -iname "*.zip" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ Portable\ \(2022-03-21\)\ \(Redump\)/ \;
|
|
||||||
@@ -3,7 +3,8 @@ readonly APP=/home/sergio/code/bashscript/skyscraper_system.sh
|
|||||||
readonly LOG=/home/sergio/cronjobs/cronjobs.log
|
readonly LOG=/home/sergio/cronjobs/cronjobs.log
|
||||||
readonly SYSTEMS_COMPUTERS="amstradcpc amiga atarist c64"
|
readonly SYSTEMS_COMPUTERS="amstradcpc amiga atarist c64"
|
||||||
readonly SYSTEMS_OTHER="dreamcast gc nds pcengine psp psx saturn segacd"
|
readonly SYSTEMS_OTHER="dreamcast gc nds pcengine psp psx saturn segacd"
|
||||||
readonly TODAY=$(date +"%d-%m-%Y")
|
TODAY=$(date +"%d-%m-%Y")
|
||||||
|
readonly TODAY
|
||||||
|
|
||||||
printf "\n%s (%s, %s)\n" "$(basename "${0}")" "${TODAY}" "$(date +%A)" >>"${LOG}"
|
printf "\n%s (%s, %s)\n" "$(basename "${0}")" "${TODAY}" "$(date +%A)" >>"${LOG}"
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ for SYSTEM in $SYSTEMS_COMPUTERS; do
|
|||||||
${APP} scrap /home/sergio/roms/computer "${SYSTEM}"
|
${APP} scrap /home/sergio/roms/computer "${SYSTEM}"
|
||||||
END=$(date -u +"%s")
|
END=$(date -u +"%s")
|
||||||
|
|
||||||
ELAPSED=$(($END - $START))
|
ELAPSED=$((END - START))
|
||||||
E=$(date -ud @$ELAPSED +'%H:%M:%S')
|
E=$(date -ud @$ELAPSED +'%H:%M:%S')
|
||||||
|
|
||||||
printf " (%s)\n" "${E}" >>"${LOG}"
|
printf " (%s)\n" "${E}" >>"${LOG}"
|
||||||
@@ -31,7 +32,7 @@ for SYSTEM in $SYSTEMS_OTHER; do
|
|||||||
${APP} scrap /home/sergio/roms/skyscraper "${SYSTEM}"
|
${APP} scrap /home/sergio/roms/skyscraper "${SYSTEM}"
|
||||||
END=$(date -u +"%s")
|
END=$(date -u +"%s")
|
||||||
|
|
||||||
ELAPSED=$(($END - $START))
|
ELAPSED=$((END - START))
|
||||||
E=$(date -ud @$ELAPSED +'%H:%M:%S')
|
E=$(date -ud @$ELAPSED +'%H:%M:%S')
|
||||||
|
|
||||||
printf " (%s)\n" "${E}" >>"${LOG}"
|
printf " (%s)\n" "${E}" >>"${LOG}"
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
TOKEN="5383183749:AAHV8pc9yN_h_LNfixOJXAvVYCNcby0HlCY"
|
|
||||||
ID="717637871"
|
|
||||||
MENSAJE=$1
|
|
||||||
URL="https://api.telegram.org/bot$TOKEN/sendMessage"
|
|
||||||
|
|
||||||
curl -s -X POST $URL -d chat_id=$ID -d text="$MENSAJE" > /dev/null
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
TOKEN="5383183749:AAHV8pc9yN_h_LNfixOJXAvVYCNcby0HlCY"
|
|
||||||
ID="717637871"
|
|
||||||
MENSAJE=$(</dev/stdin)
|
|
||||||
URL="https://api.telegram.org/bot$TOKEN/sendMessage"
|
|
||||||
|
|
||||||
curl -s -X POST $URL -d chat_id=$ID -d text="$MENSAJE" > /dev/null
|
|
||||||
Reference in New Issue
Block a user