add scripts
This commit is contained in:
parent
8e5898aa57
commit
428458e50a
36 changed files with 934 additions and 0 deletions
2
.bin/sh/aur.sh
Executable file
2
.bin/sh/aur.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
auracle search --quiet --searchby=name $1 | fzf --color="border:magenta,info:green,header:green,info:yellow,hl:blue,label:magenta" --multi --preview "auracle info {1}" --preview-window=up | xargs -ro auracle clone -C ~/Downloads/AUR
|
2
.bin/sh/bd.sh
Executable file
2
.bin/sh/bd.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
stat / | grep "Birth" | sed 's/Birth: //g' | cut -b 2-11
|
13
.bin/sh/build.sh
Executable file
13
.bin/sh/build.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Build package and prompt for cleaning
|
||||||
|
|
||||||
|
{
|
||||||
|
makepkg -si;
|
||||||
|
read -p "Clean leftover files? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
git clean -dxfi
|
||||||
|
fi
|
||||||
|
}
|
68
.bin/sh/buildgames.sh
Executable file
68
.bin/sh/buildgames.sh
Executable file
|
@ -0,0 +1,68 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Ask for confirmation to build nblood
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Build nblood? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/nblood-compile.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ask for confirmation to build rednukem
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Build rednukem? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/rednukem-compile.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Ask for confirmation to build voidsw
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Build voidsw? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/voidsw-compile.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ask for confirmation to build eduke32
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Build eduke32? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/ionfury-compile.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ask for confirmation to build vkquake
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Build Quakespasm-spiked? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/quakespasm-compile.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ask for confirmation to build crispy-doom
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Build crispy-doom? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/crispy-doom-compile.sh
|
||||||
|
fi
|
||||||
|
}
|
31
.bin/sh/catacombgl-compile.sh
Executable file
31
.bin/sh/catacombgl-compile.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/ArnoAnsems/CatacombGL;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd CatacombGL;
|
||||||
|
mkdir build;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd build;
|
||||||
|
mv /home/peter/.bin/catacombgl/CatacombGL /home/peter/.bin/catacombgl/.old;
|
||||||
|
cmake ..;
|
||||||
|
make -j12;
|
||||||
|
cp /home/peter/Downloads/git/CatacombGL/build/CatacombGL /home/peter/.bin/catacombgl;
|
||||||
|
chmod 755 /home/peter/.bin/catacombgl/CatacombGL;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/CatacombGL;
|
||||||
|
}
|
37
.bin/sh/checkupdates.sh
Executable file
37
.bin/sh/checkupdates.sh
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Check for system updates
|
||||||
|
|
||||||
|
{
|
||||||
|
echo -e "\e[94mChecking Official packages updates...
|
||||||
|
\e[39m-------------------------------------
|
||||||
|
"
|
||||||
|
checkupdates
|
||||||
|
echo -e "\e[91m
|
||||||
|
Checking AUR packages updates...
|
||||||
|
\e[39m--------------------------------
|
||||||
|
"
|
||||||
|
auracle outdated
|
||||||
|
}
|
||||||
|
|
||||||
|
# Perform system check
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Check for errors and failed services? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
systemctl --failed && journalctl -p 3 -b --since today
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Perform update
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Perform system update? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/update.sh
|
||||||
|
fi
|
||||||
|
}
|
44
.bin/sh/crispy-doom-compile.sh
Executable file
44
.bin/sh/crispy-doom-compile.sh
Executable file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/fabiangreffrath/crispy-doom.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd crispy-doom;
|
||||||
|
autoreconf -fiv;
|
||||||
|
./configure;
|
||||||
|
make;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/crispy-doom;
|
||||||
|
mv /home/peter/.bin/crispy-doom/crispy-doom /home/peter/.bin/crispy-doom/.old;
|
||||||
|
mv /home/peter/.bin/crispy-heretic/crispy-heretic /home/peter/.bin/crispy-heretic/.old;
|
||||||
|
mv /home/peter/.bin/crispy-hexen/crispy-hexen /home/peter/.bin/crispy-hexen/.old;
|
||||||
|
mv /home/peter/.bin/crispy-doom/crispy-doom-setup /home/peter/.bin/crispy-doom/.old;
|
||||||
|
mv /home/peter/.bin/crispy-heretic/crispy-heretic-setup /home/peter/.bin/crispy-heretic/.old;
|
||||||
|
mv /home/peter/.bin/crispy-hexen/crispy-hexen-setup /home/peter/.bin/crispy-hexen/.old;
|
||||||
|
cd /home/peter/Downloads/git/crispy-doom;
|
||||||
|
cp /home/peter/Downloads/git/crispy-doom/src/crispy-doom /home/peter/.bin/crispy-doom;
|
||||||
|
cp /home/peter/Downloads/git/crispy-doom/src/crispy-heretic /home/peter/.bin/crispy-heretic;
|
||||||
|
cp /home/peter/Downloads/git/crispy-doom/src/crispy-hexen /home/peter/.bin/crispy-hexen;
|
||||||
|
cp /home/peter/Downloads/git/crispy-doom/src/crispy-doom-setup /home/peter/.bin/crispy-doom;
|
||||||
|
cp /home/peter/Downloads/git/crispy-doom/src/crispy-heretic-setup /home/peter/.bin/crispy-heretic;
|
||||||
|
cp /home/peter/Downloads/git/crispy-doom/src/crispy-hexen-setup /home/peter/.bin/crispy-hexen;
|
||||||
|
chmod 755 /home/peter/.bin/crispy-doom/crispy-doom;
|
||||||
|
chmod 755 /home/peter/.bin/crispy-heretic/crispy-heretic;
|
||||||
|
chmod 755 /home/peter/.bin/crispy-hexen/crispy-hexen;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/crispy-doom;
|
||||||
|
}
|
13
.bin/sh/debianbox.sh
Executable file
13
.bin/sh/debianbox.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Ask to connect to server via SSH
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Connect to server via SSH? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
ssh kitty +kitten ssh debianbox
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
31
.bin/sh/devilutionx-compile.sh
Executable file
31
.bin/sh/devilutionx-compile.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/diasurgical/devilutionX.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd devilutionX;
|
||||||
|
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_STATIC_LIBSODIUM=ON;
|
||||||
|
cmake --build build -j $(getconf _NPROCESSORS_ONLN);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/devilutionx;
|
||||||
|
mv /home/peter/.bin/devilutionx/devilutionx /home/peter/.bin/devilutionx/.old;
|
||||||
|
cp -r /home/peter/Downloads/git/devilutionX/build/devilutionx /home/peter/.bin/devilutionx;
|
||||||
|
cp -r /mnt/M2/Downloads/git/devilutionX/assets /home/peter/.bin/devilutionx;
|
||||||
|
chmod 755 /home/peter/.bin/devilutionx/devilutionx;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/devilutionX;
|
||||||
|
}
|
1
.bin/sh/dferun.sh
Executable file
1
.bin/sh/dferun.sh
Executable file
|
@ -0,0 +1 @@
|
||||||
|
cd /home/peter/.bin/tfe && ./theforceengine
|
36
.bin/sh/dhewm3-compile.sh
Executable file
36
.bin/sh/dhewm3-compile.sh
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/dhewm/dhewm3.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
mkdir /home/peter/Downloads/git/dhewm3/build;
|
||||||
|
cd /home/peter/Downloads/git/dhewm3/build;
|
||||||
|
cmake ../neo/;
|
||||||
|
make -j12;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/dhewm3;
|
||||||
|
mv /home/peter/.bin/dhewm3/dhewm3 /home/peter/.bin/dhewm3/.old;
|
||||||
|
mv /home/peter/.bin/dhewm3/base.so /home/peter/.bin/dhewm3/.old;
|
||||||
|
mv /home/peter/.bin/dhewm3/d3xp.so /home/peter/.bin/dhewm3/.old;
|
||||||
|
cp /home/peter/Downloads/git/dhewm3/build/dhewm3 /home/peter/.bin/dhewm3;
|
||||||
|
cp /home/peter/Downloads/git/dhewm3/build/base.so /home/peter/.bin/dhewm3;
|
||||||
|
cp /home/peter/Downloads/git/dhewm3/build/d3xp.so /home/peter/.bin/dhewm3;
|
||||||
|
cd /home/peter/.bin/dhewm3;
|
||||||
|
chmod 755 /home/peter/.bin/dhewm3/dhewm3;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/dhewm3;
|
||||||
|
}
|
29
.bin/sh/doom64-compile.sh
Executable file
29
.bin/sh/doom64-compile.sh
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/atsb/Doom64EX-Plus.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git/Doom64EX-Plus/src/engine;
|
||||||
|
bash /home/peter/Downloads/git/Doom64EX-Plus/src/engine/build.sh;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/Doom64EX-Plus;
|
||||||
|
mv /home/peter/.bin/Doom64EX-Plus/DOOM64EX-Plus /home/peter/.bin/Doom64EX-Plus/.old;
|
||||||
|
cp /home/peter/Downloads/git/Doom64EX-Plus/src/engine/DOOM64EX-Plus /home/peter/.bin/Doom64EX-Plus;
|
||||||
|
chmod 755 /home/peter/.bin/Doom64EX-Plus/DOOM64EX-Plus;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/Doom64EX-Plus;
|
||||||
|
}
|
34
.bin/sh/ecwolf-compile.sh
Executable file
34
.bin/sh/ecwolf-compile.sh
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://bitbucket.org/ecwolf/ecwolf.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
mkdir -pv /home/peter/Downloads/git/ecwolf/build;
|
||||||
|
cd /home/peter/Downloads/git/ecwolf/build;
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DGPL=ON;
|
||||||
|
make;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/ecwolf;
|
||||||
|
mv /home/peter/.bin/ecwolf/ecwolf /home/peter/.bin/ecwolf/.old;
|
||||||
|
mv /home/peter/.bin/ecwolf/ecwolf.pk3 /home/peter/.bin/ecwolf/.old;
|
||||||
|
cp /home/peter/Downloads/git/ecwolf/build/ecwolf /home/peter/.bin/ecwolf;
|
||||||
|
cp /home/peter/Downloads/git/ecwolf/build/ecwolf.pk3 /home/peter/.bin/ecwolf;
|
||||||
|
cd /home/peter/.bin/ecwolf;
|
||||||
|
chmod 755 /home/peter/.bin/ecwolf/ecwolf;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/ecwolf;
|
||||||
|
}
|
32
.bin/sh/ionfury-compile.sh
Executable file
32
.bin/sh/ionfury-compile.sh
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://voidpoint.io/terminx/eduke32.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd eduke32;
|
||||||
|
make;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/eduke32;
|
||||||
|
mv /home/peter/.bin/eduke32/eduke32 /home/peter/.bin/eduke32/.old;
|
||||||
|
mv /home/peter/.bin/eduke32/mapster32 /home/peter/.bin/eduke32/.old;
|
||||||
|
cd /home/peter/Downloads/git/eduke32;
|
||||||
|
cp /home/peter/Downloads/git/eduke32/eduke32 /home/peter/.bin/eduke32;
|
||||||
|
cp /home/peter/Downloads/git/eduke32/mapster32 /home/peter/.bin/eduke32;
|
||||||
|
chmod 755 /home/peter/.bin/eduke32/eduke32;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/eduke32;
|
||||||
|
}
|
30
.bin/sh/iortcw-compile.sh
Executable file
30
.bin/sh/iortcw-compile.sh
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/iortcw/iortcw.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git/iortcw/SP;
|
||||||
|
make -j12;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/iortcw;
|
||||||
|
mv /home/peter/.bin/iortcw/* /home/peter/.bin/iortcw/.old;
|
||||||
|
cp -r /home/peter/Downloads/git/iortcw/SP/build/*/* /home/peter/.bin/iortcw;
|
||||||
|
cd /home/peter/.bin/iortcw;
|
||||||
|
chmod 755 /home/peter/.bin/iortcw/iowolfsp.x86_64;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/iortcw;
|
||||||
|
}
|
2
.bin/sh/kap.sh
Executable file
2
.bin/sh/kap.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
pacman -Qq | fzf --color="border:magenta,info:green,header:green,info:yellow,hl:blue,label:magenta" --multi --preview "pacman -Qi {1}" --preview-window=up | xargs -ro sudo pacman -R
|
2
.bin/sh/lap.sh
Executable file
2
.bin/sh/lap.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
pacman -Slq | fzf --color="border:magenta,info:green,header:green,info:yellow,hl:blue,label:magenta" --multi --preview "pacman -Si {1}" --preview-window=up | xargs -ro sudo pacman -S
|
32
.bin/sh/nblood-compile.sh
Executable file
32
.bin/sh/nblood-compile.sh
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/nukeykt/NBlood.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd NBlood;
|
||||||
|
make blood;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/NBlood;
|
||||||
|
mv /home/peter/.bin/NBlood/nblood /home/peter/.bin/NBlood/.old;
|
||||||
|
mv /home/peter/.bin/NBlood/nblood.pk3 /home/peter/.bin/NBlood/.old;
|
||||||
|
cd /home/peter/Downloads/git/NBlood;
|
||||||
|
cp /home/peter/Downloads/git/NBlood/nblood /home/peter/.bin/NBlood;
|
||||||
|
cp /home/peter/Downloads/git/NBlood/nblood.pk3 /home/peter/.bin/NBlood;
|
||||||
|
chmod 755 /home/peter/.bin/NBlood/nblood;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/NBlood;
|
||||||
|
}
|
4
.bin/sh/nmtui.sh
Executable file
4
.bin/sh/nmtui.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Execute kitty with nmtui
|
||||||
|
exec kitty --single-instance -e nmtui
|
25
.bin/sh/openjkdf2-compile.sh
Executable file
25
.bin/sh/openjkdf2-compile.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
mv /home/peter/.bin/openjkdf2/OpenJKDF2 /home/peter/.bin/openjkdf2/.old;
|
||||||
|
cd /home/peter/.bin/openjkdf2;
|
||||||
|
git clone https://github.com/shinyquagsire23/OpenJKDF2.git;
|
||||||
|
cd OpenJKDF2;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
git submodule update --init
|
||||||
|
export CC=clang;
|
||||||
|
export CXX=clang++;
|
||||||
|
chmod +x build_linux64.sh;
|
||||||
|
./build_linux64.sh;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
chmod 755 /home/peter/.bin/openjkdf2/OpenJKDF2/build_linux64/openjkdf2;
|
||||||
|
}
|
19
.bin/sh/orphans.sh
Executable file
19
.bin/sh/orphans.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Check for orphans then asks for removal
|
||||||
|
|
||||||
|
{
|
||||||
|
while [[ $(pacman -Qtdq) ]];
|
||||||
|
do
|
||||||
|
pacman -Qtdq;
|
||||||
|
read -p "Remove orphaned packages? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
sudo pacman -R $(pacman -Qtdq)
|
||||||
|
elif [[ -n $(pacman -Qtdq) ]];
|
||||||
|
then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
13
.bin/sh/pkgb.sh
Executable file
13
.bin/sh/pkgb.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#Check PKGBUILD file
|
||||||
|
|
||||||
|
{
|
||||||
|
less PKGBUILD;
|
||||||
|
read -p "Build package? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/build.sh
|
||||||
|
fi
|
||||||
|
}
|
32
.bin/sh/quakespasm-compile.sh
Executable file
32
.bin/sh/quakespasm-compile.sh
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/Shpoike/Quakespasm.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git/Quakespasm/Quake;
|
||||||
|
make;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/Quakespasm;
|
||||||
|
mv /home/peter/.bin/Quakespasm/quakespasm /home/peter/.bin/Quakespasm/.old;
|
||||||
|
mv /home/peter/.bin/Quakespasm/quakespasm.pak /home/peter/.bin/Quakespasm/.old;
|
||||||
|
cd /home/peter/Downloads/git/Quakespasm/Quake;
|
||||||
|
cp /home/peter/Downloads/git/Quakespasm/Quake/quakespasm /home/peter/.bin/Quakespasm;
|
||||||
|
cp /home/peter/Downloads/git/Quakespasm/Quake/quakespasm.pak /home/peter/.bin/Quakespasm;
|
||||||
|
chmod 755 /home/peter/.bin/Quakespasm;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/Quakespasm;
|
||||||
|
}
|
12
.bin/sh/reboot.sh
Executable file
12
.bin/sh/reboot.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Prompt Reboot
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Reboot now? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
command shutdown -r now
|
||||||
|
fi
|
||||||
|
}
|
32
.bin/sh/rednukem-compile.sh
Executable file
32
.bin/sh/rednukem-compile.sh
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://github.com/nukeykt/NBlood.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd NBlood;
|
||||||
|
make rednukem;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/Rednukem;
|
||||||
|
mv /home/peter/.bin/Rednukem/rednukem /home/peter/.bin/Rednukem/.old;
|
||||||
|
mv /home/peter/.bin/Rednukem/dn64widescreen.pk3 /home/peter/.bin/Rednukem/.old;
|
||||||
|
cd /home/peter/Downloads/git/NBlood;
|
||||||
|
cp /home/peter/Downloads/git/NBlood/rednukem /home/peter/.bin/Rednukem;
|
||||||
|
cp /home/peter/Downloads/git/NBlood/dn64widescreen.pk3 /home/peter/.bin/Rednukem;
|
||||||
|
chmod 755 /home/peter/.bin/Rednukem/rednukem;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/NBlood;
|
||||||
|
}
|
2
.bin/sh/server.sh
Executable file
2
.bin/sh/server.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
kitty --session ~/.config/kitty/session --listen-on=unix:@mykitty
|
12
.bin/sh/shutdown.sh
Executable file
12
.bin/sh/shutdown.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Prompt Reboot
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Shutdown now? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
command shutdown -h now
|
||||||
|
fi
|
||||||
|
}
|
5
.bin/sh/songdetail.sh
Executable file
5
.bin/sh/songdetail.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
song_info=$(playerctl metadata --format ' {{title}} - {{artist}}')
|
||||||
|
|
||||||
|
echo "$song_info"
|
10
.bin/sh/steamskin.sh
Executable file
10
.bin/sh/steamskin.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#https://wiki.archlinux.org/title/steam#Changing_the_Steam_notification_position
|
||||||
|
mkdir -p ~/.steam/root/skins
|
||||||
|
cd ~/.steam/root/skins
|
||||||
|
mkdir -p StopAnimations/resource
|
||||||
|
cp -r ~/.steam/root/resource/styles StopAnimations/resource
|
||||||
|
sed -i '/Notifications.SlideDirection/ s/"[A-Za-z]*"/"None"/' StopAnimations/resource/styles/* #no animation sliding
|
||||||
|
sed -i '/Notifications.FadeInTime/ s/"0.[0-9+]*"/"0.0"/' StopAnimations/resource/styles/* #no fade in time for notifications
|
||||||
|
sed -i '/Notifications.FadeOutTime/ s/"0.[0-9+]*"/"0.0"/' StopAnimations/resource/styles/* #no fade out time for notifications
|
||||||
|
sed -i '/Notifications.StackSize/ s/"[0-9]*"/"5"/' StopAnimations/resource/styles/* #show max 5 notifications instead of max 3 at the same time
|
2
.bin/sh/swaylock.sh
Executable file
2
.bin/sh/swaylock.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
swaylock -f -i DP-1:~/.wallpapers/castlevania.png -i DP-2:~/.wallpapers/castlevania2.png --inside-color "#44475a" --inside-clear-color "#50fa7b" --ring-color "#ff79c6" --text-caps-lock-color "#f8f8f2" --ring-caps-lock-color "#f8f8f2" --key-hl-color "#50fa7b"
|
26
.bin/sh/tfe-compile.sh
Executable file
26
.bin/sh/tfe-compile.sh
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/.bin/tfe/TheForceEngine
|
||||||
|
mv /home/peter/.bin/tfe/* /home/peter/.bin/tfe/.old;
|
||||||
|
cd /home/peter/.bin/tfe;
|
||||||
|
git clone https://github.com/luciusDXL/TheForceEngine.git;
|
||||||
|
mkdir TheForceEngine/tfe-build; cd TheForceEngine/tfe-build;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cmake -S /home/peter/.bin/tfe/TheForceEngine;
|
||||||
|
make -j12;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/tfe;
|
||||||
|
cp -r /home/peter/.bin/tfe/TheForceEngine/tfe-build/* /home/peter/.bin/tfe;
|
||||||
|
chmod 755 /home/peter/.bin/tfe/TheForceEngine/tfe-build/theforceengine;
|
||||||
|
}
|
||||||
|
|
166
.bin/sh/tv_rename.sh
Executable file
166
.bin/sh/tv_rename.sh
Executable file
|
@ -0,0 +1,166 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
#
|
||||||
|
# Written by Anthony Lobianco, 01/23/2014
|
||||||
|
#
|
||||||
|
# A simple script to batch rename television files
|
||||||
|
#
|
||||||
|
# USAGE
|
||||||
|
# -----
|
||||||
|
# chmod a+x tv_rename.sh
|
||||||
|
# ./tv_rename.sh -d /path/to/show/S01
|
||||||
|
#
|
||||||
|
# CHANGELOG
|
||||||
|
# ---------
|
||||||
|
#
|
||||||
|
# 1.0.0
|
||||||
|
# -----
|
||||||
|
# initial commit
|
||||||
|
#
|
||||||
|
# 1.0.1
|
||||||
|
# -----
|
||||||
|
# check to make sure input directory exists
|
||||||
|
#
|
||||||
|
# 1.0.2
|
||||||
|
# -----
|
||||||
|
# handle file types other than .mkv
|
||||||
|
# make sure new format has same extension as old file
|
||||||
|
# make sure new format includes the SXXEYY placeholder
|
||||||
|
#
|
||||||
|
# 1.0.3
|
||||||
|
# -----
|
||||||
|
# if SXXEYY pattern is not present, automatically determine it from filename
|
||||||
|
#
|
||||||
|
|
||||||
|
VRS=1.0.3
|
||||||
|
|
||||||
|
bold=`tput bold` # bold characters in echo
|
||||||
|
normal=`tput sgr0` # normal characters in echo
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
echo "BATCH RENAME SCRIPT v$VRS"
|
||||||
|
echo -n "server: "
|
||||||
|
echo $SSH_CONNECTION | awk '{print $3}'
|
||||||
|
echo " "
|
||||||
|
|
||||||
|
DIR=""
|
||||||
|
|
||||||
|
while getopts ":d:" OPTION
|
||||||
|
do
|
||||||
|
case $OPTION in
|
||||||
|
d)
|
||||||
|
if [ "$OPTARG" = "." ]; then
|
||||||
|
DIR=`pwd`
|
||||||
|
else
|
||||||
|
DIR="$OPTARG"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$DIR" = "" ]; then
|
||||||
|
echo "no directory specified (use -d /path/to/directory/)"
|
||||||
|
echo "EXIT"
|
||||||
|
exit 1
|
||||||
|
elif [ ! -d "$DIR" ]; then
|
||||||
|
echo "$DIR does not exist"
|
||||||
|
echo "EXIT"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "renaming files in:\t ${bold}${DIR}${normal}"
|
||||||
|
|
||||||
|
LAST_FILE=`ls -l "$DIR" | tail -1 | awk '{print $NF}'`
|
||||||
|
FILE_TYPE=`basename $LAST_FILE | awk -F . '{print $NF}'`
|
||||||
|
|
||||||
|
echo -e "last file looks like:\t ${bold}${LAST_FILE}${normal}\n"
|
||||||
|
|
||||||
|
rename_files() {
|
||||||
|
local format=$1
|
||||||
|
local dry_run=$2
|
||||||
|
|
||||||
|
# find SXXEYY pattern
|
||||||
|
REGEX="([sS]([0-9]{2,}|[X]{2,})[eE]([0-9]{2,}|[Y]{2,}))"
|
||||||
|
if [[ ! $format =~ $REGEX ]]; then
|
||||||
|
echo "could not find SXXEYY pattern in new format"
|
||||||
|
echo " "
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
MATCH="${BASH_REMATCH[1]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# needed if directory name has whitespace (e.g. /media/Family Guy/)
|
||||||
|
SAVEIFS=$IFS
|
||||||
|
IFS=$(echo -en "\n\b")
|
||||||
|
|
||||||
|
SEASON=`basename "$DIR"`
|
||||||
|
EPISODE=1
|
||||||
|
for ITEM in $(find "$DIR" -type f -name "*.${FILE_TYPE}" | sort); do
|
||||||
|
if (( $EPISODE < 10 )); then
|
||||||
|
SE="${SEASON}E0${EPISODE}"
|
||||||
|
else
|
||||||
|
SE="${SEASON}E${EPISODE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $MATCH != $SE ]]; then
|
||||||
|
FILE="${format/$MATCH/$SE}"
|
||||||
|
else
|
||||||
|
FILE=$format
|
||||||
|
fi
|
||||||
|
|
||||||
|
# list the files during dry run, rename them otherwise
|
||||||
|
if $dry_run; then
|
||||||
|
echo -e " mv `basename $ITEM` \n -> $FILE"
|
||||||
|
else
|
||||||
|
if [[ `basename $ITEM` == $FILE ]]; then
|
||||||
|
echo "rename not needed for `basename $ITEM`"
|
||||||
|
else
|
||||||
|
echo -e "renaming $ITEM \n to -> \t $DIR/$FILE"
|
||||||
|
mv $ITEM "$DIR/$FILE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
|
||||||
|
EPISODE=$((EPISODE + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
IFS=$SAVEIFS
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "what format do you want to use to rename files?"
|
||||||
|
echo -e "(ex: Breaking.Bad.SXXEYY.1080p.BluRay.DTS.x264-rovers.mkv)\n"
|
||||||
|
|
||||||
|
while read -ep "[format]: " FORMAT
|
||||||
|
do
|
||||||
|
echo " "
|
||||||
|
|
||||||
|
# do some error checks
|
||||||
|
if [[ $FORMAT != *.${FILE_TYPE} ]]; then
|
||||||
|
echo "make sure new format has same file type extension (.${FILE_TYPE})"
|
||||||
|
echo " "
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
rename_files $FORMAT true
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
|
||||||
|
while read -ep "[continue? y/n]: " CONTINUE
|
||||||
|
do
|
||||||
|
if [[ $CONTINUE = y ]]; then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
continue 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
|
||||||
|
rename_files $FORMAT false
|
||||||
|
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
echo "DONE"
|
||||||
|
exit 0
|
37
.bin/sh/update.sh
Executable file
37
.bin/sh/update.sh
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Perform update
|
||||||
|
|
||||||
|
sudo pacman -Syu
|
||||||
|
|
||||||
|
# Check pacdiff
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Execute pacdiff? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
pacdiff -s
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# Check for orphans
|
||||||
|
{
|
||||||
|
read -p "Check for orphan packages? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
sudo bash /home/peter/.bin/sh/orphans.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# Update the Ollama model
|
||||||
|
|
||||||
|
read -p "Would you like to update your ollama model? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
echo "Updating ollama model..."
|
||||||
|
ollama pull llama3.1
|
||||||
|
fi
|
||||||
|
# Prompt reboot
|
||||||
|
|
||||||
|
~/.bin/sh/reboot.sh
|
49
.bin/sh/updatenew.sh
Executable file
49
.bin/sh/updatenew.sh
Executable file
|
@ -0,0 +1,49 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Check for updates
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Check for updates? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
~/.bin/sh/checkupdates.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Perform system check
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Check for errors and failed services? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
systemctl --failed && journalctl -p 3 -b
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Perform update
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Perform system update? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
sudo pacman -Syu;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check pacdiff
|
||||||
|
|
||||||
|
{
|
||||||
|
read -p "Execute pacdiff? [y/n]:" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
sudo pacdiff
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prompt reboot
|
||||||
|
|
||||||
|
~/.bin/sh/reboot.sh
|
30
.bin/sh/voidsw-compile.sh
Executable file
30
.bin/sh/voidsw-compile.sh
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Switch to git directory and clone source
|
||||||
|
{
|
||||||
|
cd /home/peter/Downloads/git;
|
||||||
|
git clone https://voidpoint.io/terminx/eduke32.git;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
|
||||||
|
{
|
||||||
|
cd eduke32;
|
||||||
|
make voidsw;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install executable @ ~/.bin
|
||||||
|
|
||||||
|
{
|
||||||
|
cd /home/peter/.bin/voidsw;
|
||||||
|
mv /home/peter/.bin/voidsw/voidsw /home/peter/.bin/voidsw/.old;
|
||||||
|
cd /home/peter/Downloads/git/eduke32;
|
||||||
|
cp /home/peter/Downloads/git/eduke32/voidsw /home/peter/.bin/voidsw;
|
||||||
|
chmod 755 /home/peter/.bin/voidsw/voidsw;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
|
||||||
|
{
|
||||||
|
rm -rf /home/peter/Downloads/git/eduke32;
|
||||||
|
}
|
19
.bin/sh/weather.sh
Executable file
19
.bin/sh/weather.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# weather.sh
|
||||||
|
for i in {1..5}
|
||||||
|
do
|
||||||
|
text=$(curl -s "https://v2.wttr.in/$1?format=1&m")
|
||||||
|
if [[ $? == 0 ]]
|
||||||
|
then
|
||||||
|
text=$(echo "$text" | sed -E "s/\s+/ /g")
|
||||||
|
tooltip=$(echo -ne "Santo Domingo, Dominican Republic:";curl -s "https://wttr.in/$1?format=2&m")
|
||||||
|
if [[ $? == 0 ]]
|
||||||
|
then
|
||||||
|
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
|
||||||
|
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"
|
Loading…
Add table
Add a link
Reference in a new issue