diff options
Diffstat (limited to '.bin')
-rwxr-xr-x | .bin/clean.sh | 3 | ||||
-rwxr-xr-x | .bin/download_music.sh | 26 | ||||
-rwxr-xr-x | .bin/esp_upload.sh | 6 | ||||
-rwxr-xr-x | .bin/file_upload.sh | 38 | ||||
-rwxr-xr-x | .bin/update.sh | 4 |
5 files changed, 77 insertions, 0 deletions
diff --git a/.bin/clean.sh b/.bin/clean.sh new file mode 100755 index 0000000..3e6bbfd --- /dev/null +++ b/.bin/clean.sh | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | sudo emerge --ask --depclean; | ||
diff --git a/.bin/download_music.sh b/.bin/download_music.sh new file mode 100755 index 0000000..e3a3601 --- /dev/null +++ b/.bin/download_music.sh | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | BOLD="\e[1"; | ||
4 | ENDCOLOR="\e[0m"; | ||
5 | Green="32"; | ||
6 | LightRed="31"; | ||
7 | |||
8 | if ! [ $1 ]; then | ||
9 | echo "" | ||
10 | echo -e $BOLD";"";"$LightRed"m Please provide music url!"$ENDCOLOR | ||
11 | echo "" | ||
12 | exit | ||
13 | fi | ||
14 | |||
15 | MUSIC_DIR="~/Documents/Music/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s" | ||
16 | if [ $2 ]; then | ||
17 | MUSIC_DIR="${a}/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s" | ||
18 | fi | ||
19 | |||
20 | echo "" | ||
21 | echo -e $BOLD";"";"$Green"m Music will download to ${MUSIC_DIR} directory!"$ENDCOLOR | ||
22 | echo "" | ||
23 | |||
24 | sleep 1 | ||
25 | |||
26 | yt-dlp -x --audio-format mp3 --embed-metadata -o $MUSIC_DIR $1 | ||
diff --git a/.bin/esp_upload.sh b/.bin/esp_upload.sh new file mode 100755 index 0000000..27d8d41 --- /dev/null +++ b/.bin/esp_upload.sh | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # rm /tmp/arduino-sketch-*/ -r | ||
4 | ~/.local/bin/arduino-cli cache clean | ||
5 | ~/.local/bin/arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 | ||
6 | ~/.local/bin/arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2 | ||
diff --git a/.bin/file_upload.sh b/.bin/file_upload.sh new file mode 100755 index 0000000..0ff6c57 --- /dev/null +++ b/.bin/file_upload.sh | |||
@@ -0,0 +1,38 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | BOLD="\e[1"; | ||
4 | ENDCOLOR="\e[0m"; | ||
5 | Green="32m"; | ||
6 | LightRed="31m"; | ||
7 | |||
8 | echo "" | ||
9 | echo -e $BOLD";"";"$Green" FILE UPLOADER"$ENDCOLOR | ||
10 | echo "" | ||
11 | |||
12 | if ! [ $1 ]; then | ||
13 | echo "" | ||
14 | echo -e $BOLD";"";"$LightRed" Please provide file path!"$ENDCOLOR | ||
15 | echo "" | ||
16 | exit | ||
17 | fi | ||
18 | |||
19 | if [ $1 ]; then | ||
20 | echo -e " Are u sure u want upload this file: "$BOLD";"";"$Green" '$1'"$ENDCOLOR"? [y/N]: " | ||
21 | read -p " " input | ||
22 | echo "" | ||
23 | # read -r -p " " input | ||
24 | case $input in | ||
25 | [yY][eE][sS]|[yY]) | ||
26 | URL=$(curl -s -F "file=@$1" https://0x0.st); | ||
27 | echo -e " URL: "$BOLD";"";"$Green"$URL"$ENDCOLOR; | ||
28 | ;; | ||
29 | [nN][oO]|[nN]) | ||
30 | echo -e $BOLD";"";"$Green" OK"$ENDCOLOR; | ||
31 | ;; | ||
32 | *) | ||
33 | echo -e $BOLD";"";"$LightRed" Invalid input..."$ENDCOLOR; | ||
34 | exit 1 | ||
35 | ;; | ||
36 | esac | ||
37 | echo "" | ||
38 | fi; | ||
diff --git a/.bin/update.sh b/.bin/update.sh new file mode 100755 index 0000000..e6f9f8d --- /dev/null +++ b/.bin/update.sh | |||
@@ -0,0 +1,4 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | sudo emerge --sync | ||
4 | sudo emerge --ask --verbose --update --newuse --deep @world; | ||