Compare commits
65 Commits
Author | SHA1 | Date | |
---|---|---|---|
d9b6d6b3c5 | |||
7a23304c9c | |||
eeecf8df23 | |||
5f289995ba | |||
5542e2ab9a | |||
43cca1cb99 | |||
e2de8ac908 | |||
da2f64b165 | |||
ddbd422e11 | |||
7e9f60c3ec | |||
84a19253c0 | |||
d1e9c221a3 | |||
86c1d119e1 | |||
d1474f7522 | |||
ff60ec22e5 | |||
c82ab68762 | |||
9774c9bccb | |||
e0156f36d9 | |||
48238e0c69 | |||
ccb3595db7 | |||
75e0782e01 | |||
d1bc6670fc | |||
a488e9c456 | |||
823e728a8d | |||
932ba2906c | |||
841ee333cf | |||
97e883237d | |||
143e9bb6fb | |||
86bc1b0a7d | |||
d374017931 | |||
a40728af77 | |||
56b71c6f61 | |||
8da16f9de6 | |||
26c0e76abc | |||
777ce925d8 | |||
a84a159552 | |||
898d0c1d5c | |||
eed18bf679 | |||
cf87160b26 | |||
b97f6b0229 | |||
2eb31d7a7b | |||
61639c60a5 | |||
4a51a06fae | |||
981f24ec8e | |||
93510fd7d6 | |||
f55fa43175 | |||
f419fbf5b3 | |||
52fde23819 | |||
f597d1285f | |||
2242818f97 | |||
6a6616cfbc | |||
167eaf8c95 | |||
a67d23f6cf | |||
4f3d6ca96f | |||
aef1d2d10f | |||
6f24ce861c | |||
720e2a2ad3 | |||
eb593f4df7 | |||
faeb58e3d4 | |||
562ad079ea | |||
9687642456 | |||
ad4e548f25 | |||
38ef6ec0a3 | |||
5b91f75118 | |||
38ac94ceaa |
46
.todo2
Normal file
46
.todo2
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"title": "",
|
||||
"tasks": [
|
||||
{
|
||||
"text": "Clean dishes in sink",
|
||||
"priority": "veryhigh",
|
||||
"creation": 1585609661,
|
||||
"completion": 1585675940
|
||||
},
|
||||
{
|
||||
"text": "Cancel duolingo subscription before April 2nd",
|
||||
"priority": "veryhigh",
|
||||
"creation": 1585614956
|
||||
},
|
||||
{
|
||||
"text": "Write post on Nim forums about Space Nim",
|
||||
"priority": "medium",
|
||||
"creation": 1585117484
|
||||
},
|
||||
{
|
||||
"text": "find radio chargers",
|
||||
"priority": "low",
|
||||
"creation": 1585609589
|
||||
},
|
||||
{
|
||||
"text": "work on old computer from Lee",
|
||||
"priority": "low",
|
||||
"creation": 1585609627
|
||||
},
|
||||
{
|
||||
"text": "set up joplin on Lindsay's computer",
|
||||
"priority": "low",
|
||||
"creation": 1585609744
|
||||
},
|
||||
{
|
||||
"text": "get smokes",
|
||||
"priority": "medium",
|
||||
"creation": 1585667890
|
||||
},
|
||||
{
|
||||
"text": "Fix Jsearch",
|
||||
"priority": "medium",
|
||||
"creation": 1585671336
|
||||
}
|
||||
]
|
||||
}
|
45
.todo2~
Normal file
45
.todo2~
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
"title": "",
|
||||
"tasks": [
|
||||
{
|
||||
"text": "Clean dishes in sink",
|
||||
"priority": "veryhigh",
|
||||
"creation": 1585609661
|
||||
},
|
||||
{
|
||||
"text": "Cancel duolingo subscription before April 2nd",
|
||||
"priority": "veryhigh",
|
||||
"creation": 1585614956
|
||||
},
|
||||
{
|
||||
"text": "Write post on Nim forums about Space Nim",
|
||||
"priority": "medium",
|
||||
"creation": 1585117484
|
||||
},
|
||||
{
|
||||
"text": "find radio chargers",
|
||||
"priority": "low",
|
||||
"creation": 1585609589
|
||||
},
|
||||
{
|
||||
"text": "work on old computer from Lee",
|
||||
"priority": "low",
|
||||
"creation": 1585609627
|
||||
},
|
||||
{
|
||||
"text": "set up joplin on Lindsay's computer",
|
||||
"priority": "low",
|
||||
"creation": 1585609744
|
||||
},
|
||||
{
|
||||
"text": "get smokes",
|
||||
"priority": "medium",
|
||||
"creation": 1585667890
|
||||
},
|
||||
{
|
||||
"text": "Fix Jsearch",
|
||||
"priority": "medium",
|
||||
"creation": 1585671336
|
||||
}
|
||||
]
|
||||
}
|
36
88x2bu.sh
Executable file
36
88x2bu.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
GITHUB_REPO="https://github.com/RinCat/RTL88x2BU-Linux-Driver.git"
|
||||
TEMPDIR="/tmp"
|
||||
|
||||
|
||||
dependencies_(){
|
||||
if [ -f /usr/bin/dnf ];then
|
||||
dnf install make kernel-devel git
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
clone_(){
|
||||
if [ ! -d "${TEMPDIR}"/88xbu ];then
|
||||
git clone "${GITHUB_REPO}" "${TEMPDIR}"/88xbu
|
||||
fi
|
||||
}
|
||||
|
||||
build_(){
|
||||
if [ -d "${TEMPDIR}"/88xbu ];then
|
||||
cd "${TEMPDIR}"/88xbu
|
||||
make clean
|
||||
make "${1}"
|
||||
make install
|
||||
else
|
||||
echo "${TEMPDIR}/88xbu does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies_
|
||||
clone_
|
||||
build_ "${1}"
|
@ -31,7 +31,7 @@ withLoop(){
|
||||
clear
|
||||
echo
|
||||
|
||||
echo "Pinging: ${site}"
|
||||
echo "Pinging ${site} until a connection is reached"
|
||||
${pingcmd} ${site} &>/dev/null
|
||||
if [ $? = "2" ];then
|
||||
echo
|
||||
@ -87,7 +87,7 @@ withoutLoop(){
|
||||
elif [ $? = "1" ];then
|
||||
|
||||
if [ "${play_sound}" = "true" ];then
|
||||
${sound_player} ${player_opts} ${sound_file} "${sound_message}" &
|
||||
${sound_player} "${player_opts}" "${sound_file}" "${sound_message}" &
|
||||
fi
|
||||
|
||||
|
66
billpay.sh
Executable file
66
billpay.sh
Executable file
@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
|
||||
electricBill="https://login.auth.aps.com/apsprodb2c.onmicrosoft.com/oauth2/v2.0/authorize?p=b2c_1a_aps_paassitecoresignin&response_type=code&client_id=874546d6-0a39-4299-b663-68cd9346f21f&redirect_uri=https://www.aps.com/authorization/loginredirect&scope=https://APSPRODB2C.onmicrosoft.com/APSBusinessAPI/user_impersonation%20offline_access%20openid&nonce=f0984d65-2e3a-479c-9bdb-3ad6ca7ef21c&response_mode=form_post&resource=%20https%3A%2F%2FAPSPRODB2C.onmicrosoft.com%2FAPSBusinessAPI"
|
||||
gasBill="https://uesaz.com"
|
||||
internetBill="https://customer.sparklight.com/securelogin/login.aspx"
|
||||
waterBill="https://xpressbillpay.com/"
|
||||
|
||||
main_menu(){
|
||||
PS3="Enter a number: "
|
||||
select bill in Electric Gas Internet Water
|
||||
do
|
||||
|
||||
case "${REPLY}" in
|
||||
1) xdg-open "${electricBill}"
|
||||
;;
|
||||
|
||||
2) xdg-open "${gasBill}"
|
||||
;;
|
||||
|
||||
3) xdg-open "${internetBill}"
|
||||
;;
|
||||
|
||||
4) xdg-open "${waterBill}"
|
||||
;;
|
||||
|
||||
q) exit 0
|
||||
;;
|
||||
|
||||
*) echo "Please choose an existing option"
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
case "${1}" in
|
||||
|
||||
-e) xdg-open "${electricBill}"
|
||||
;;
|
||||
|
||||
-g) xdg-open "${gasBill}"
|
||||
;;
|
||||
|
||||
-i) xdg-open "${internetBill}"
|
||||
;;
|
||||
|
||||
-w) xdg-open "${waterBill}"
|
||||
;;
|
||||
|
||||
-h|--help|help)
|
||||
|
||||
echo """
|
||||
$0 [-e] [-g] [-i] [-w]
|
||||
|
||||
-e Electric bill
|
||||
-g Gas bill
|
||||
-i Internet bill
|
||||
-w Water bill
|
||||
"""
|
||||
;;
|
||||
|
||||
*) main_menu
|
||||
;;
|
||||
|
||||
esac
|
@ -1,94 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Title in Bootloader
|
||||
TITLE="Glitchd Void"
|
||||
|
||||
# Filename of ISO file
|
||||
FILENAME="glitchd-voidlinux_jan-4-2017_${ARCH}.iso"
|
||||
|
||||
# System architecture
|
||||
ARCH="i686"
|
||||
|
||||
# Local Language
|
||||
LOCALE="en_US.UTF-8"
|
||||
|
||||
# Keyboard Layout
|
||||
KEYMAP="us"
|
||||
|
||||
# Compression type of initramfs
|
||||
INITRAMFS_COMP="xz"
|
||||
|
||||
# Compression type of squashfs
|
||||
SQUASHFS_COMP="xz"
|
||||
|
||||
# Cache directory
|
||||
CACHEDIR="/var/cache/xbps"
|
||||
|
||||
# List of packages to include
|
||||
PACKAGES='
|
||||
xorg
|
||||
lxdm
|
||||
xfce4
|
||||
xfce4-whiskermenu-plugin
|
||||
xfce4-mixer
|
||||
xfce4-pulseaudio-plugin
|
||||
faenza-icon-theme
|
||||
alsa-utils
|
||||
pulseaudio
|
||||
NetworkManager
|
||||
linux-firmware-network
|
||||
linux-tools
|
||||
clementine
|
||||
cmus
|
||||
fuse
|
||||
ntfs-3g
|
||||
thunar-archive-plugin
|
||||
e2fsprogs
|
||||
hfsprogs
|
||||
audacity
|
||||
pluma
|
||||
mplayer
|
||||
mpv
|
||||
lua52
|
||||
lua52-devel
|
||||
smplayer
|
||||
network-manager-applet
|
||||
gnome-keyring
|
||||
net-tools
|
||||
nmap
|
||||
iotop
|
||||
htop
|
||||
git
|
||||
grub
|
||||
dialog
|
||||
openssh
|
||||
virtualbox-ose
|
||||
deluge
|
||||
python
|
||||
hexchat
|
||||
filezilla
|
||||
chromium
|
||||
mumble
|
||||
gparted
|
||||
pcmanfm
|
||||
dhcpcd
|
||||
pianobar
|
||||
void-repo-nonfree
|
||||
k3b'
|
||||
|
||||
|
||||
########################################
|
||||
## LEAVE THE BELOW COMMANDS ALONE ##
|
||||
## UNLESS YOU KNOW WHAT YOU ARE DOING ##
|
||||
########################################
|
||||
|
||||
./mklive.sh\
|
||||
-T "${TITLE}"\
|
||||
-o "${FILENAME}"\
|
||||
-a "${ARCH}"\
|
||||
-l "${LOCALE}"\
|
||||
-k "${KEYMAP}"\
|
||||
-i "${INITRAMFS_COMP}"\
|
||||
-s "${SQUASHFS_COMP}"\
|
||||
-c "${CACHEDIR}"\
|
||||
-p "${PACKAGES}"
|
42
config
42
config
@ -1,8 +1,3 @@
|
||||
Host gitbutter-server
|
||||
HostName gitbutter.pw
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host jsearch.pw
|
||||
HostName jsearch.pw
|
||||
User mollusk
|
||||
@ -23,7 +18,42 @@ Host void-ryzen
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host gitea
|
||||
Host gitbutter.xyz
|
||||
HostName gitbutter.xyz
|
||||
User git
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host zolfite.net
|
||||
HostName zolfite.net
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host cloud.zolfite.net
|
||||
HostName cloud.zolfite.net
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host mooretalk.live
|
||||
HostName mooretalk.live
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host sickstream.net
|
||||
HostName sickstream.net
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host nightcrew.rip
|
||||
HostName nightcrew.rip
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host gitea-server
|
||||
HostName gitbutter.xyz
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host pihole
|
||||
HostName 192.168.1.200
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
78
d2-setup.sh
78
d2-setup.sh
@ -1,27 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Wine Prefix Environment
|
||||
PREFIX="/home/$USER/diablo"
|
||||
ARCH="win32"
|
||||
|
||||
|
||||
notice(){
|
||||
echo -e "${YELLOW}NOTICE: Currently you must move & rename the installer directories to the following: ${NC}\n"
|
||||
echo -e "${LCYAN}Base Game: ${HOME}/D2${NC}"
|
||||
echo -e "${LCYAN}Expansion: ${HOME}/LOD${NC}"
|
||||
echo -e "${YELLOW}\nThen run this script with the following option:${NC}"
|
||||
echo -e "${LCYAN}${0} -a${NC}"
|
||||
echo -e "${YELLOW}\nThe script will then kick off the process of grabbing debs, setting the prefix and installing the game.${NC}"
|
||||
echo -e "${YELLOW}User intervention is required to click through the installer setups${NC}"
|
||||
}
|
||||
|
||||
installD2(){
|
||||
notice
|
||||
read -n 1 -p "~~~~~~ Press enter to continue ~~~~~~"
|
||||
|
||||
D2_INSTALLER_PATH="/home/$USER/D2"
|
||||
|
||||
echo -e "\nInstalling Diablo II...\n"
|
||||
echo -e "\n${LGREEN}Installing Diablo II...${NC}\n"
|
||||
|
||||
if [ ! -d "${D2_INSTALLER_PATH}" ];then
|
||||
echo -e "${D2_INSTALLER_PATH} not found, edit script and set correct path\n"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
cd ${D2_INSTALLER_PATH}
|
||||
cd "${D2_INSTALLER_PATH}" || exit 1
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine Installer.exe
|
||||
|
||||
}
|
||||
|
||||
installLOD(){
|
||||
|
||||
notice
|
||||
read -n 1 -p "~~~~~~ Press enter to continue ~~~~~~"
|
||||
|
||||
LOD_INSTALLER_PATH="/home/$USER/LOD"
|
||||
|
||||
echo -e "\nInstalling Diablo II: Lord of Destruction...\n"
|
||||
@ -31,7 +69,7 @@ installLOD(){
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
cd ${LOD_INSTALLER_PATH}
|
||||
cd "${LOD_INSTALLER_PATH}" || exit 1
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine Installer.exe
|
||||
}
|
||||
@ -60,20 +98,20 @@ getTricks(){
|
||||
|
||||
getGlide(){
|
||||
if [ ! -f /tmp/gl32ogl14e.zip ];then
|
||||
cd /tmp
|
||||
cd /tmp || exit 1
|
||||
wget http://www.svenswrapper.de/gl32ogl14e.zip
|
||||
|
||||
unzip gl32ogl14e.zip
|
||||
|
||||
echo -e "\nCopying Files to Diablo game directory...\n"
|
||||
|
||||
cp -v {glide-init.exe,glide3x.dll} ${PREFIX}/drive_c/"Program Files"/"Diablo II"/
|
||||
cp -v {glide-init.exe,glide3x.dll} "${PREFIX}/drive_c/Program Files/Diablo II/"
|
||||
|
||||
echo -e "\nCleaning up temp files...\n"
|
||||
|
||||
rm {glide-readme.txt,glide-liesmich.txt,glide-init.exe,glide3x.dll,gl32ogl14e.zip}
|
||||
|
||||
cd ${PREFIX}/drive_c/"Program Files"/"Diablo II"/
|
||||
cd "${PREFIX}/drive_c/"Program Files"/"Diablo II"/" || exit 1
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine glide-init.exe
|
||||
|
||||
@ -82,11 +120,11 @@ getGlide(){
|
||||
}
|
||||
runGame(){
|
||||
|
||||
cd ${PREFIX}/drive_c/"Program Files"/"Diablo II"/
|
||||
cd "${PREFIX}/drive_c/Program Files/Diablo II/" || exit 1
|
||||
|
||||
|
||||
echo -n -e "\nRun game now?(Y/n): "
|
||||
read choice
|
||||
echo -n -e "\n${LGREEN}Run game now?(Y/n): ${NC}"
|
||||
read -r choice
|
||||
|
||||
if [ "${choice}" = "n" ];then
|
||||
exit 0;
|
||||
@ -97,6 +135,19 @@ runGame(){
|
||||
|
||||
}
|
||||
|
||||
run_glide(){
|
||||
|
||||
|
||||
cd "${PREFIX}/drive_c/Program Files/Diablo II/" || exit 1
|
||||
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine "glide-init.exe"
|
||||
|
||||
}
|
||||
|
||||
run_tricks(){
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" winetricks "${1}" "${2}"
|
||||
}
|
||||
runWinecfg(){
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" winecfg
|
||||
}
|
||||
@ -131,6 +182,15 @@ case "${1}" in
|
||||
cfg|-c)
|
||||
runWinecfg
|
||||
;;
|
||||
|
||||
rg| --run-glide)
|
||||
run_glide
|
||||
;;
|
||||
|
||||
tricks)
|
||||
run_tricks "${1}" "${2}"
|
||||
;;
|
||||
|
||||
all|-a)
|
||||
getDeps
|
||||
installD2
|
||||
|
37
dino-git.sh
Executable file
37
dino-git.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
GIT_URL="https://github.com/dino/dino.git"
|
||||
MASTER_DIR="dino"
|
||||
BUILD_DIR="build"
|
||||
|
||||
|
||||
if [[ -z "${1}" ]];then
|
||||
echo "Please specify how many threads you want the make command to use (starting from 0)"
|
||||
echo "Example: ${0} 5"
|
||||
echo "The above example will use 4 threads"
|
||||
exit 0
|
||||
fi
|
||||
echo "getting dependencies..."
|
||||
|
||||
if [[ -f /usr/bin/apt ]];then
|
||||
sudo apt install cmake valac libgee-0.8-dev libsqlite3-dev libgtk-3-dev libnotify-dev libgpgme-dev libsoup2.4-dev libgcrypt20-dev libqrencode-dev gettext libsignal-protocol-c-dev
|
||||
elif [[ -f /usr/bin/dnf ]];then
|
||||
sudo dnf install cmake vala libgee-devel gtk3-devel libgcrypt-devel qrencode-devel gdk-pixbuf2-devel libsoup-devel gpgme-devel libsignal-protocol-c-devel
|
||||
else
|
||||
echo "Package manager not detected"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${MASTER_DIR}" ]];then
|
||||
git clone ${GIT_URL}
|
||||
cd ${MASTER_DIR}
|
||||
./configure
|
||||
make -j${1}
|
||||
|
||||
if [[ ! -f "${BUILD_DIR}/dino" ]];then
|
||||
echo "The build failed, since the ${BUILD_DIR} is missing"
|
||||
exit 1
|
||||
else
|
||||
echo "You can now run the binary located in $(pwd)/${BUILD_DIR}"
|
||||
fi
|
||||
else echo "${MASTER_DIR} directory exists already"
|
||||
fi
|
45
doppler.sh
Executable file
45
doppler.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
# doppler.sh
|
||||
|
||||
RADAR_IMAGE_URL="https://radar.weather.gov/lite/N0R/FSX_loop.gif"
|
||||
VIDEO_PLAYER=/usr/bin/mpv
|
||||
LINK_DOWNLOADER=/usr/bin/curl
|
||||
FORECAST_URL="wttr.in"
|
||||
TERMINAL_APP=/usr/bin/xterm
|
||||
TERMINAL_OPTS="-maximized -hold -e"
|
||||
|
||||
if [[ ! -f "${VIDEO_PLAYER}" ]];then
|
||||
echo "${VIDEO_PLAYER} not found"
|
||||
echo "Please install it with your system's package manager"
|
||||
notify-send "${VIDEO_PLAYER} not found" "Please install it with your system's package manager"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "${LINK_DOWNLOADER}" ]];then
|
||||
echo "${VIDEO_PLAYER} not found"
|
||||
echo "Please install it with your system's package manager"
|
||||
notify-send "${VIDEO_PLAYER} not found" "Please install it with your system's package manager"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "${1}" in
|
||||
|
||||
-f | forecast)
|
||||
echo "Getting forecast from ${FORECAST_URL}..."
|
||||
${LINK_DOWNLOADER} ${FORECAST_URL}
|
||||
;;
|
||||
|
||||
-ft | forecast-terminal)
|
||||
notify-send "Getting forecast from ${FORECAST_URL}..."
|
||||
${TERMINAL_APP} ${TERMINAL_OPTS} ${LINK_DOWNLOADER} ${FORECAST_URL}
|
||||
;;
|
||||
|
||||
-h | help | --help)
|
||||
echo -e "\nUsage: ${0} [-f | forecast ], [-ft, forecast-terminal], [-h, help, --help]\n"
|
||||
;;
|
||||
|
||||
*)
|
||||
notify-send "Getting radar image" "please wait..."
|
||||
${VIDEO_PLAYER} --loop=inf "${RADAR_IMAGE_URL}"
|
||||
;;
|
||||
esac
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
KEYFILE="/home/${USER}/.ssh/github_key"
|
||||
|
||||
eval "$(ssh-agent -s)"
|
||||
ssh-add ${KEYFILE}
|
13
flatjerk.sh
13
flatjerk.sh
@ -37,11 +37,14 @@ addFlatpakRepo(){
|
||||
}
|
||||
|
||||
getPackages(){
|
||||
printf "\nInstalling Gradio..\n"
|
||||
flatpak install flathub de.haeckerfelix.gradio
|
||||
echo -e "\nInstalling Shortwave..\n"
|
||||
flatpak install flathub shortwave -y
|
||||
|
||||
printf "\nInstalling Adapta Theme...\n"
|
||||
echo -e "\nInstalling Adapta Theme...\n"
|
||||
flatpak install flathub org.gtk.Gtk3theme.Adapta-Nokto-Eta
|
||||
|
||||
echo -e "Installing Bitwarden...\n"
|
||||
flatpak install flathub bitwarden -y
|
||||
}
|
||||
|
||||
helpFile(){
|
||||
@ -61,4 +64,8 @@ case ${1} in
|
||||
addFlatpakRepo
|
||||
getPackages
|
||||
;;
|
||||
|
||||
-r)
|
||||
addFlatpakRepo
|
||||
;;
|
||||
esac
|
19
func_test.sh
19
func_test.sh
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
testingpoo(){
|
||||
|
||||
if [ $1 -gt $2 ];then
|
||||
echo "$1 is greater than $2"
|
||||
|
||||
elif [ $1 -lt $2 ];then
|
||||
echo "$1 is less than $2"
|
||||
|
||||
elif [ $1 -eq $2 ];then
|
||||
echo "$1 is equal to $2"
|
||||
|
||||
else
|
||||
echo "Fuck you"
|
||||
fi
|
||||
}
|
||||
|
||||
testingpoo $1 $2
|
33
genswap.sh
33
genswap.sh
@ -41,8 +41,8 @@ function autoSwap(){
|
||||
echo -e "${LGREEN}------------------------------------------------------------------${NC}"
|
||||
read
|
||||
|
||||
echo -e "${LCYAN}\nCreating file in ${SWAPPATH}...\n${NC}"
|
||||
fallocate -l ${TOTALRAM}M ${SWAPPATH}${SWAPNAME}
|
||||
echo -e "${LCYAN}\nCreating file ${SWAPPATH}${SWAPNAME}...\n${NC}"
|
||||
dd if=/dev/zero of=${SWAPPATH}${SWAPNAME} count=${TOTALRAM} bs=1MiB
|
||||
ls -lh ${SWAPPATH}${SWAPNAME}
|
||||
|
||||
sleep 1
|
||||
@ -57,28 +57,29 @@ function autoSwap(){
|
||||
read markswap
|
||||
|
||||
if [ "${markswap}" = "n" ] || [ "${markswap}" = "N" ];then
|
||||
echo "\n${LCYAN}Not making ${SWAPPATH}/${SWAPFILE} as swap...${NC}\n"
|
||||
fi
|
||||
echo -e "\n${LCYAN}Not making ${SWAPPATH}/${SWAPFILE} as swap...${NC}\n"
|
||||
else
|
||||
|
||||
echo -e "\n${LCYAN}Marking ${SWAPPATH}${SWAPNAME} as swap...\n\n${NC}"
|
||||
mkswap ${SWAPPATH}${SWAPNAME}
|
||||
|
||||
echo -e "${LCYAN}Enabling Swap file for use...${NC}\n"
|
||||
swapon ${SWAPPATH}${SWAPNAME}
|
||||
|
||||
fi
|
||||
echo -e -n "\n${YELLOW}Do you want to add swapfile to fstab?(Y/n): ${NC}"
|
||||
read addfstab
|
||||
|
||||
if [ "${addfstab}" = "n" ];then
|
||||
if [ "${addfstab}" = "n" ] || [[ "${addfstab}" = "N" ]];then
|
||||
echo -e "\n${LCYAN} Not adding ${SWAPPATH}${SWAPNAME} to fstab${NC}\n"
|
||||
fi
|
||||
else
|
||||
|
||||
echo -e "\n${LCYAN}Creating backup of /etc/fstab ...\n${NC}"
|
||||
cp -v /etc/fstab /etc/fstab.bak
|
||||
|
||||
|
||||
echo -e "${LCYAN}Adding ${SWAPPATH}${SWAPNAME} to /etc/fstab ..\n${NC}"
|
||||
echo "${SWAPPATH}${SWAPNAME} none swap sw 0 0" | sudo tee -a /etc/fstab
|
||||
|
||||
fi
|
||||
CHECKFSTAB=$(cat /etc/fstab | grep "swap" | gawk '/swap/{print $1}')
|
||||
|
||||
if [ "${CHECKFSTAB}" != "/swapfile" ];then
|
||||
@ -87,18 +88,8 @@ function autoSwap(){
|
||||
else
|
||||
echo -e "${LGREEN}Swap successfully added to /etc/fstab! Reboot to verify success...${NC}\n"
|
||||
|
||||
echo -e "${YELLOW}Do you want to reboot your system now?(n/Y): ${NC}"
|
||||
read rebootCheck
|
||||
|
||||
if [ "${rebootCheck}" = "y" ] || [ "${rebootCheck}" = "Y" ];then
|
||||
echo -e "${LRED}Rebooting system in 3 seconds...${NC}\n"
|
||||
|
||||
sleep 3
|
||||
|
||||
sudo reboot
|
||||
else
|
||||
echo -e "\n${LGREEN}Swapfile setup complete, setting swappiness level...${NC}\n"
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
@ -176,7 +167,7 @@ liveSwappiness(){
|
||||
echo -e "${LGREEN}${CURRENTSWAPPINESS}${NC}\n"
|
||||
}
|
||||
|
||||
function help(){
|
||||
function helpFile(){
|
||||
echo -e "\nUsage: $0 [-a] [--auto] [-s] [--swappiness]\n\n"
|
||||
echo -e "-a | --auto Automatically create and size swapfile based on physical memory\n"
|
||||
echo -e "-ss | --set-swappiness Set the swappiness value to minimize swap usage\n\n"
|
||||
@ -222,6 +213,6 @@ case "${1}" in
|
||||
;;
|
||||
|
||||
*)
|
||||
help
|
||||
helpFile
|
||||
;;
|
||||
esac
|
36
get-lbry.sh
36
get-lbry.sh
@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
appname="LBRY"
|
||||
version="0.15.0"
|
||||
arch="amd64"
|
||||
url="https://github.com/lbryio/lbry-app/releases/download/v${version}/${appname}_${version}_${arch}.deb"
|
||||
depends="gnome-keyring nodejs npm binutils xz"
|
||||
tmpdir="/tmp"
|
||||
output_file="lbry.deb"
|
||||
desc="Content distribution platform using blockchain technology"
|
||||
|
||||
fetch_deps(){
|
||||
sudo dnf install ${depends}
|
||||
}
|
||||
|
||||
fetch_url(){
|
||||
if [ ! -f ${tmpdir}/${output_file} ];then
|
||||
wget -O ${tmpdir}/${output_file} ${url}
|
||||
fi
|
||||
}
|
||||
|
||||
extract_file(){
|
||||
cd ${tmpdir}
|
||||
sudo ar x ${output_file} data.tar.xz
|
||||
sudo tar xvf data.tar.xz
|
||||
}
|
||||
|
||||
install(){
|
||||
sudo cp -rv ${tmpdir}/usr/* /usr/
|
||||
sudo cp -rv ${tmpdir}/opt/* /opt/
|
||||
}
|
||||
|
||||
fetch_deps
|
||||
fetch_url
|
||||
extract_file
|
||||
install
|
56
gitbucket.sh
56
gitbucket.sh
@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
GITBUCKETPATH="/home/mollusk/.gitbucket"
|
||||
WARFILE="gitbucket.war"
|
||||
LIBNOTIFY="true"
|
||||
LOGDIR="/tmp"
|
||||
LOGFILE="gitbucket.log"
|
||||
|
||||
CheckNotify()
|
||||
{
|
||||
if [ "${LIBNOTIFY}" = "true" ];then
|
||||
notify-send "$1"
|
||||
elif [ "${LIBNOTIFY}" = "false" ];then
|
||||
"$1" &> /dev/null
|
||||
echo "$(date +"%T"): [INFO]: libnotify support disabled" >> ${LOGDIR}/${LOGFILE}
|
||||
else
|
||||
echo "[ATTENTION]: Please check the logs: /tmp/gitbucket.log"
|
||||
echo "$(date +"%T"): [WARNING]: LIBNOTIFY setting is invalid" >> ${LOGDIR}/${LOGFILE}
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start) nohup java -jar ${GITBUCKETPATH}/${WARFILE} &> /dev/null &
|
||||
|
||||
sleep 1
|
||||
|
||||
PID=$(pidof java)
|
||||
|
||||
if [ "${PID}" ];then
|
||||
CheckNotify "Gitbucket started on PID: ${PID}"
|
||||
echo "Gitbucket started on PID: ${PID}"
|
||||
else
|
||||
CheckNotify "Gitbucket Failed to start!"
|
||||
echo "Gitbucket process failed to start!"
|
||||
fi
|
||||
;;
|
||||
|
||||
stop) killall java
|
||||
sleep 1
|
||||
if [ ! "${PID}" ];then
|
||||
CheckNotify "Gitbucket was terminated"
|
||||
echo "Gitbucket was terminated"
|
||||
else
|
||||
CheckNotify "There was a problem terminating Gitbucket"
|
||||
echo "There was a problem terminating Gitbucket"
|
||||
fi
|
||||
|
||||
|
||||
;;
|
||||
|
||||
open) xdg-open "http://localhost:8080" &> /dev/null
|
||||
;;
|
||||
|
||||
status) ps -fC java
|
||||
;;
|
||||
esac
|
112
goup.sh
112
goup.sh
@ -1,112 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
case ${1} in
|
||||
|
||||
--set-version)
|
||||
version="${2}"
|
||||
;;
|
||||
|
||||
*)
|
||||
pkgname="go"
|
||||
version="1.9.1"
|
||||
distfile="https://storage.googleapis.com/golang/${pkgname}${version}.linux-amd64.tar.gz"
|
||||
tmpdir="/tmp"
|
||||
installdir="/usr/local"
|
||||
checksum=d70eadefce8e160638a9a6db97f7192d8463069ab33138893ad3bf31b0650a79
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
fetch_(){
|
||||
printf "${BWHITE}\nFetching file\n${NC}"
|
||||
cd ${tmpdir}
|
||||
|
||||
if [ ! -f ${pkgname}${version}.linux-amd64.tar.gz ];then
|
||||
wget ${distfile}
|
||||
fi
|
||||
printf "${BWHITE}\nVerifying checksum\n${NC}"
|
||||
|
||||
if [ ! -f checksum.txt ];then
|
||||
echo "${checksum} ${pkgname}${version}.linux-amd64.tar.gz" >> checksum.txt
|
||||
sha256sum -c checksum.txt
|
||||
|
||||
else
|
||||
sha256sum -c checksum.txt
|
||||
fi
|
||||
|
||||
if [ $? = 1 ];then
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
extract-install_(){
|
||||
cd ${tmpdir}
|
||||
|
||||
if [ ! -f ${pkgname}${version}.linux-amd64.tar.gz ];then
|
||||
echo "No file found to extract"
|
||||
else
|
||||
printf "${BWHITE}\nExtracting and installing to:${NC} " && printf "${LCYAN}${installdir}\n${NC}"
|
||||
printf "${LRED}\nAuthentication for root:${NC}\n" && su -c "tar -C ${installdir} -xzvf ${pkgname}${version}.linux-amd64.tar.gz"
|
||||
fi
|
||||
|
||||
if [ ! -d /usr/local/go ];then
|
||||
echo -e "\nCan not find ${pkgname} in ${installdir}\n"
|
||||
exit 0;
|
||||
else
|
||||
echo -e "${LGREEN}\n${pkgname}-${version} has been installed to ${installdir}${NC}"
|
||||
fi
|
||||
}
|
||||
|
||||
add-path_(){
|
||||
echo -e "\n1. Add gopath to ${HOME}/.profile\n"
|
||||
echo -e "\n2. Add gopath to ${HOME}/.bashrc\n"
|
||||
read choice
|
||||
|
||||
if [ "${choice}" = "1" ];then
|
||||
echo 'export PATH=$PATH:/usr/local/go/bin' >> ${HOME}/.profile
|
||||
elif [ "${choice}" = "2" ];then
|
||||
printf "${BWHITE}\nAdding gopath to .bashrc${NC}"
|
||||
echo 'export PATH=$PATH:/usr/local/go/bin' >> ${HOME}/.bashrc
|
||||
catpath=$(cat ${HOME}/.bashrc | grep /usr/local/go/bin)
|
||||
|
||||
${catpath}
|
||||
|
||||
if [ $? = 1 ];then
|
||||
printf "${BWHITE}\n\nRunning grep on .bashrc\n\n${NC}"
|
||||
printf "${LCYAN}Grep Results:${NC} ${LGREEN}${catpath}\n\n${NC}"
|
||||
|
||||
printf "${YELLOW}Please edit: ${HOME}/.bashrc:${NC}\n\n"
|
||||
printf "${YELLOW}Above are results for grep on .bashrc, if nothing is there then please add:\n\n${NC}${BWHITE}"
|
||||
echo -e 'export PATH=$PATH:/usr/local/go/bin' && printf "\n\n${NC}"
|
||||
|
||||
else
|
||||
printf "${LGREEN}\n\ngo has been added to your path in ${HOME}/.bashrc\n\n${NC}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
fetch_
|
||||
extract-install_
|
||||
add-path_
|
||||
;;
|
||||
|
||||
--help | -h)
|
||||
printf "${BWHITE}\nUseage ${0} [options] [arguments]\n\n${NC}"
|
||||
|
||||
printf "--set-version enter in an existing go version to download\n"
|
||||
printf "--help, -help Display this help page"
|
||||
;;
|
||||
|
||||
esac
|
21
insanity.py
Executable file
21
insanity.py
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from time import sleep
|
||||
timer = 0.000001
|
||||
num = 100000 ** 1000
|
||||
print(num)
|
||||
while True:
|
||||
# Even Number
|
||||
if (num % 2) == 0:
|
||||
num = num // 2
|
||||
print(num)
|
||||
sleep(timer)
|
||||
else:
|
||||
# Odd Number
|
||||
num = num * 3 + 1
|
||||
print(num)
|
||||
sleep(timer)
|
||||
|
||||
if num == 1:
|
||||
exit(0)
|
||||
|
@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
URL="https://wire-app.wire.com/linux/wire_2.12.2729_amd64.deb"
|
||||
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
checkDeps()
|
||||
{
|
||||
if [ ! -f /usr/bin/gdebi ];then
|
||||
|
||||
printf "${LBLUE}Downloading dependencies..${NC}\n"
|
||||
sudo apt update
|
||||
sudo apt-get -y install gdebi
|
||||
if [ ! -f /usr/bin/gdebi ];then
|
||||
printf "${LRED}gdebi could not be found, I installed it but it's not there${NC}\n"
|
||||
printf "${LRED}I normally use gdebi to install individual packages${NC}\n"
|
||||
exit 0;
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
getWire()
|
||||
{
|
||||
printf "${LBLUE}Downloading wire...${NC}\n"
|
||||
|
||||
wget ${URL}
|
||||
|
||||
printf "${LCYAN}Installing Wire...${NC}\n"
|
||||
|
||||
sudo gdebi -n wire_2.12.2729_amd64.deb
|
||||
}
|
||||
|
||||
checkDeps
|
||||
getWire
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
KEYFILE="/home/mollusk/.ssh/gitbutter_thinkpad"
|
||||
|
||||
ssh-add ${KEYFILE}
|
||||
|
||||
eval `ssh-agent`
|
11
machine.sh
11
machine.sh
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
if [ "${1}" = "emach" ];then
|
||||
ssh -p 27 glitchd@173.175.90.33
|
||||
|
||||
elif [ "${1}" = "hp" ];then
|
||||
ssh -p 22 glitchd@173.175.90.33
|
||||
else
|
||||
echo "That is not a known machine"
|
||||
fi
|
16
mkuser.sh
16
mkuser.sh
@ -6,14 +6,14 @@ Create_user(){
|
||||
|
||||
echo
|
||||
echo -n "Username: "
|
||||
read uname
|
||||
read -r uname
|
||||
|
||||
echo "Additional Groups: "
|
||||
echo
|
||||
echo "[1] - Arch Linux Defaults"
|
||||
echo "[2] - Void Linux Defaults"
|
||||
echo "[3] - Custom"
|
||||
read dgroups
|
||||
read -r dgroups
|
||||
|
||||
if [ "${dgroups}" = "1" ];then
|
||||
addgroups="power, wheel, optical network, video, audio, storage"
|
||||
@ -21,16 +21,16 @@ Create_user(){
|
||||
addgroups="disk,wheel,storage,audio,video,optical,lp,network,dbus,xbuilder"
|
||||
elif [ "${dgroups}" = "3" ];then
|
||||
echo -n "Enter desired groups (comma separated): "
|
||||
read custgroups
|
||||
read -r custgroups
|
||||
addgroups="${custgroups}"
|
||||
fi
|
||||
echo "${addgroups}"
|
||||
read -n 1 -p "wait"
|
||||
useradd -m -g users -G "${addgroups}" -s /bin/bash ${uname}
|
||||
read -r -n 1 -p "wait"
|
||||
useradd -m -g users -G "${addgroups}" -s /bin/bash "${uname}"
|
||||
passwd "${uname}"
|
||||
echo
|
||||
|
||||
if [ -d /home/${uname} ];then
|
||||
if [ -d /home/"${uname}" ];then
|
||||
echo "User ${uname} created"
|
||||
else
|
||||
echo "User creation failed"
|
||||
@ -40,7 +40,7 @@ Create_user(){
|
||||
Remove_user(){
|
||||
echo
|
||||
echo -n "Username to delete: "
|
||||
read duser
|
||||
read -r duser
|
||||
|
||||
userdel ${duser}
|
||||
if [ -d /home/${duser} ];then
|
||||
@ -59,7 +59,7 @@ main(){
|
||||
echo "[2] - Remove User"
|
||||
echo
|
||||
echo -n "Choose: "
|
||||
read choice
|
||||
read -r choice
|
||||
|
||||
|
||||
if [ "${choice}" = "1" ];then
|
||||
|
4
nmip.sh
4
nmip.sh
@ -19,8 +19,10 @@ NC='\033[0m' # No Color
|
||||
|
||||
if [ ! -f /usr/bin/nmap ];then
|
||||
printf "${LRED} Nmap is not installed...${NC}\n"
|
||||
else
|
||||
elif [ ! -z "${1}" ];then
|
||||
nmap -sP "${1}/24"
|
||||
|
||||
else
|
||||
printf "${LGREEN}Looking up ${lanip}...${NC}\n"
|
||||
nmap -sP ${lanip}/24 # Use sudo to get names of devies
|
||||
fi
|
||||
|
6
noagendastream.sh
Executable file
6
noagendastream.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
if [ -f /usr/bin/mpv ];then
|
||||
mpv http://listen.noagendastream.com/noagenda
|
||||
fi
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkglist="usbutils pcmanfm net-tools gmusicbrowser pianobar chromium
|
||||
deluge chromium-pepper-flash gcc-c++ mlocate gvfs ntfs-3g
|
||||
atom terminator alsa-utils xfce4-whiskermenu-plugin playonlinux"
|
||||
|
||||
tux i void-repo-nonfree void-repo-multilib
|
||||
tux i ${pkglist}
|
12
parlink.sh
12
parlink.sh
@ -47,7 +47,7 @@ PARSEC_BIN="/usr/bin/parsecd"
|
||||
PARSEC_ARGS="app_daemon=1"
|
||||
PARSEC_URL="https://parsecgaming.com"
|
||||
PARSEC_PROCESS=$(ps -A | grep -c parsecd)
|
||||
|
||||
AUTO_RESTART=true
|
||||
###########################################
|
||||
set_video_driver(){
|
||||
declare -a driver_name
|
||||
@ -102,9 +102,11 @@ start_parsec(){
|
||||
while [[ ${PARSEC_PROCESS} != "1" ]];do
|
||||
if [[ ! -f ${PARSEC_BIN} ]];then
|
||||
xdg-open ${PARSEC_URL}
|
||||
elif [[ "${1}" = "-b" ]];then
|
||||
fi
|
||||
|
||||
if [[ "${AUTO_RESTART}" = false ]];then
|
||||
${PARSEC_BIN} ${PARSEC_ARGS}
|
||||
break
|
||||
exit
|
||||
|
||||
else
|
||||
${PARSEC_BIN} ${PARSEC_ARGS}
|
||||
@ -120,9 +122,9 @@ case "${1}" in
|
||||
|
||||
if [[ ! -z "${2}" ]];then
|
||||
set_video_driver "${2}"
|
||||
start_parsec "-b"
|
||||
start_parsec
|
||||
else
|
||||
start_parsec "-b"
|
||||
start_parsec
|
||||
fi
|
||||
;;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
audio_quality = {high, medium, low}
|
||||
#autostart_station = stationid
|
||||
|
||||
password = guitar
|
||||
password = %4*dxXKQf9AmF5
|
||||
user = silvernode@gmail.com
|
||||
|
@ -1,45 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
pkgname="master"
|
||||
pkgurl="https://github.com/cilynx/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959/archive/${pkgname}.zip"
|
||||
installcmd="dnf install"
|
||||
installcmdextra="dnf group install"
|
||||
pkgdeps="wget unzip dnsmasq hostapd bc dkms kernel-headers rsync"
|
||||
pkgdepsextra='"Development Tools"'
|
||||
tmpdir="/tmp"
|
||||
pkgname="rtl88x2bu-git"
|
||||
pkgurl="https://github.com/RinCat/RTL88x2BU-Linux-Driver.git"
|
||||
tmpdir="/usr/src"
|
||||
|
||||
_fetch_deps(){
|
||||
${installcmd} ${pkgdeps}
|
||||
${installcmdextra} ${pkgdepsextra}
|
||||
if [ -f /usr/bin/apt ];then
|
||||
sudo apt install git dnsmasq hostapd bc build-essential dkms wget unzip rsync
|
||||
|
||||
elif [ -f /usr/bin/dnf ];then
|
||||
sudo dnf group install "Development Tools"
|
||||
sudo dnf install unzip dnsmasq hostapd bc dkms kernel-headers rsync wget
|
||||
else
|
||||
echo "No supported package manager"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
_download(){
|
||||
if [ ! -f ${tmpdir}/${pkgname}.zip ];then
|
||||
wget ${pkgurl} -P ${tmpdir}
|
||||
if [ ! -d "${tmpdir}"/"${pkgname}" ];then
|
||||
sudo git clone "${pkgurl}" "${tmpdir}"/"${pkgname}"
|
||||
fi
|
||||
}
|
||||
|
||||
_extract(){
|
||||
if [ -f $(which unzip) ];then
|
||||
cd ${tmpdir}
|
||||
unzip ${pkgname}.zip
|
||||
else
|
||||
echo "Install unzip"
|
||||
fi
|
||||
|
||||
_apply_patch(){
|
||||
wget "https://github.com/cilynx/rtl88x2bu/pull/58.patch"
|
||||
git apply 58.patch
|
||||
}
|
||||
|
||||
_install(){
|
||||
cd ${tmpdir}/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959-master
|
||||
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
|
||||
rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
|
||||
dkms add -m rtl88x2bu -v ${VER}
|
||||
dkms build -m rtl88x2bu -v ${VER}
|
||||
dkms install -m rtl88x2bu -v ${VER}
|
||||
sed -i 's/PACKAGE_VERSION="@PKGVER@"/PACKAGE_VERSION="git"/g' /usr/src/rtl88x2bu-git/dkms.conf
|
||||
sudo dkms add -m rtl88x2bu -v git
|
||||
sudo dkms autoinstall
|
||||
sudo modprobe 88x2bu
|
||||
}
|
||||
|
||||
_fetch_deps
|
||||
_download
|
||||
_extract
|
||||
_install
|
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
xbps-install -Su
|
||||
|
||||
if [ $? = 0 ];then
|
||||
echo "Success!"
|
||||
|
||||
elif [ $? = 1 ];then
|
||||
echo "Nothing to see here"
|
||||
fi
|
14
steamloop.sh
Executable file
14
steamloop.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Running Steam in Wine causes Steam on Linux to lose connection
|
||||
# This makes it hard to use Steam link if Steam has to be closed to reset
|
||||
# This script just reopens Steam on the host so that Steam link can reconnect.
|
||||
|
||||
while true;do
|
||||
|
||||
if [ -z "$(pidof steam)" ];then
|
||||
sleep 10s
|
||||
/usr/bin/steam
|
||||
fi
|
||||
|
||||
done
|
93
svc.sh
93
svc.sh
@ -17,25 +17,30 @@
|
||||
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
##############################################################################################
|
||||
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
if [[ -f "/usr/bin/sv " ]];then
|
||||
serviceManager="runit"
|
||||
echo -e "${LGREEN}Detected Runit${NC}\n"
|
||||
elif [[ -f "/usr/bin/systemctl" ]];then
|
||||
serviceManager="systemd"
|
||||
echo -e "${LGREEN}Detected SystemD${NC}\n"
|
||||
else
|
||||
echo -e "${LRED}no supported service manager found${NC}\n"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
help(){
|
||||
printf """
|
||||
svc - Service Commander - frontend for the sv command
|
||||
|
||||
Usage: svc enable | unenable | enableed | list | up | start | restart | stop <service>
|
||||
Usage: svc enable | disable | enabled | list | up | start | restart | stop <service>
|
||||
|
||||
|
||||
For detailed help, see the commands below:
|
||||
@ -45,7 +50,7 @@ start Start an enabled service
|
||||
restart Restart a enabled service
|
||||
stop Stop an enabled service
|
||||
enable Symenlink directory/file to /var/service
|
||||
unenable Remove symlink from /var/service
|
||||
disable Remove symlink from /var/service
|
||||
enabled View synlinked paths of all services
|
||||
ls List enabled and unenabled service files
|
||||
up Show status of running services
|
||||
@ -53,13 +58,14 @@ up Show status of running services
|
||||
"""
|
||||
}
|
||||
|
||||
runit(){
|
||||
case $1 in
|
||||
|
||||
enable | --enable-service )
|
||||
ln -v -s /etc/sv/"${2}" /var/service/
|
||||
;;
|
||||
|
||||
unenable | --remove-service )
|
||||
disable | --remove-service )
|
||||
rm -v /var/service/"${2}"
|
||||
;;
|
||||
|
||||
@ -99,3 +105,66 @@ case $1 in
|
||||
help
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
systemd(){
|
||||
|
||||
case "${1}" in
|
||||
enable | --enable-service)
|
||||
systemctl enable "${2}"
|
||||
;;
|
||||
|
||||
disable | --disable-service)
|
||||
systemctl disable "${2}"
|
||||
;;
|
||||
|
||||
enabled | --enabled-services)
|
||||
systemctl list-unit-files --state=enabled
|
||||
;;
|
||||
|
||||
list | ls | --list)
|
||||
echo
|
||||
echo -e "${LGREEN}Available Services (/etc/systemd/system):${NC}\n"
|
||||
ls /etc/systemd/system/
|
||||
echo
|
||||
echo -e "${LCYAN}Enabled Services:${NC}\n"
|
||||
systemctl list-unit-files --state=enabled
|
||||
echo
|
||||
;;
|
||||
up)
|
||||
if [[ ! -z "${2}" ]];then
|
||||
systemctl status "${2}"
|
||||
else
|
||||
systemctl --type=service --state=running
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
start)
|
||||
systemctl start "${2}"
|
||||
;;
|
||||
|
||||
restart)
|
||||
systemctl restart "${2}"
|
||||
;;
|
||||
|
||||
stop)
|
||||
systemctl stop "${2}"
|
||||
;;
|
||||
|
||||
--help | -help | help)
|
||||
help
|
||||
;;
|
||||
|
||||
|
||||
|
||||
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ "${serviceManager}" = "runit" ]];then
|
||||
runit "${1}" "${2}"
|
||||
elif [[ "${serviceManager}" = "systemd" ]];then
|
||||
systemd "${1}" "${2}"
|
||||
fi
|
@ -1,126 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Name : telegram-installer.sh
|
||||
############################################################################
|
||||
## This program is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
############################################################################
|
||||
|
||||
URL="https://tdesktop.com/linux"
|
||||
FILE="tsetup.tar.xz"
|
||||
OUTDIR="${HOME}/.telegram/bin"
|
||||
SYMDIR="/usr/bin"
|
||||
|
||||
#check and create directories
|
||||
checkDir(){
|
||||
|
||||
if [ ! -d ${OUTDIR} ];then
|
||||
mkdir -v -p ${OUTDIR}
|
||||
if [ ! -d ${OUTDIR} ];then
|
||||
echo "The directory '${OUTDIR}' could not be created"
|
||||
return false
|
||||
fi
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
askOpen(){
|
||||
|
||||
echo -n "Do you want to run telegram now?[y/n]"
|
||||
read runNow
|
||||
|
||||
if [ "${runNow}" = "y" ];then
|
||||
${OUTDIR}/Telegram/Telegram
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
createSym(){
|
||||
echo -n "Do you want to create a symlink to ${SYMDIR}?[y/n](requires root): "
|
||||
read symchoice
|
||||
|
||||
if [ ${symchoice} = "n" ];then
|
||||
return 1
|
||||
else
|
||||
sudo ln -s -v ${OUTDIR}/Telegram/Telegram ${SYMDIR}/telegram
|
||||
fi
|
||||
}
|
||||
chkInstall(){
|
||||
|
||||
if [ -d ~/.telegram ];then
|
||||
echo
|
||||
echo -n "Telegram is already installed, would you like to uninstall it?[y/n]: "
|
||||
read choice
|
||||
|
||||
if [ "${choice}" = "y" ];then
|
||||
echo
|
||||
echo "Removing symlink from ${SYNDIR}..."
|
||||
sudo rm /usr/bin/telegram
|
||||
echo
|
||||
echo "Removing ${OUTDIR}..."
|
||||
echo
|
||||
rm -r -v ~/.telegram
|
||||
if [ ! -d ~/.telegram ];then
|
||||
echo
|
||||
echo "Telegram is uninstalled"
|
||||
exit 0;
|
||||
else
|
||||
echo
|
||||
echo "Telegram is still installed, please remove it manually"
|
||||
fi
|
||||
else
|
||||
echo
|
||||
echo "Skipping removal"
|
||||
exit 0;
|
||||
fi
|
||||
else
|
||||
echo
|
||||
echo "Telegram is not installed"
|
||||
fi
|
||||
}
|
||||
|
||||
#Pull everything together
|
||||
main(){
|
||||
chkInstall
|
||||
checkDir
|
||||
if [ ! checkDir ];then
|
||||
echo "Looks like something went wrong creating the directory"
|
||||
|
||||
else
|
||||
|
||||
if [ ! -f /tmp/${FILE} ];then
|
||||
wget -O /tmp/${FILE} ${URL}
|
||||
tar xvf /tmp/${FILE} -C ${OUTDIR}
|
||||
echo
|
||||
createSym
|
||||
askOpen
|
||||
elif [ -f /tmp/${FILE} ];then
|
||||
tar xvf /tmp/${FILE} -C ${OUTDIR}
|
||||
echo
|
||||
createSym
|
||||
askOpen
|
||||
else
|
||||
echo "Looks like the file does not exist"
|
||||
echo "Check your internet connection and system permissions"
|
||||
return false
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
main
|
2
trb.sh
2
trb.sh
@ -20,7 +20,7 @@ zenity --question --text "Do you want to trim?"
|
||||
if [[ $? == 1 ]];then
|
||||
exit
|
||||
else
|
||||
notify-send "Trimming..."
|
||||
notify-send -a "FS-Trim" "Trimming..."
|
||||
echo "Trimming..."
|
||||
results=$(${su_prompt} /sbin/fstrim -va)
|
||||
notify-send "${results}"
|
||||
|
48
tux-setup.sh
48
tux-setup.sh
@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
while true;do
|
||||
|
||||
echo "[1] - Install Tux"
|
||||
echo "[2] - Remove Tux"
|
||||
echo
|
||||
echo "[q] - Quit"
|
||||
echo
|
||||
echo -n "~$: "
|
||||
read choice
|
||||
|
||||
if [ "${choice}" = "1" ];then
|
||||
sudo apt-get install ruby git
|
||||
mkdir -p /home/$USER/.tux
|
||||
cd .tux
|
||||
git clone https://gitlab.com/silvernode/tux.git
|
||||
echo "Creating synlink to Tux"
|
||||
sudo ln -s /home/$USER/.tux/tux/tux.rb /usr/bin/tux
|
||||
if [ -f /usr/bin/tux ];then
|
||||
tuxbin=$(which tux)
|
||||
echo "Tux is symlinked in: ${tuxbin}"
|
||||
exit 0;
|
||||
else
|
||||
echo "Could not find tux, installation failed faggot"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
elif [ "${choice}" = "2" ];then
|
||||
if [ -d /home/$USER/.tux ];then
|
||||
rm -r /home/$USER/.tux
|
||||
sudo rm /usr/bin/tux
|
||||
if [ ! -d /home/$USER/.tux ];then
|
||||
echo "Tux is fucking gone"
|
||||
exit 0;
|
||||
else
|
||||
echo "Tux is still fucking there"
|
||||
exit 0;
|
||||
fi
|
||||
else
|
||||
echo "There was some issue installing this shit"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
done
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
URL="http://homebutter.com/feed/tux.git"
|
||||
|
||||
|
||||
rsstail -1 -u "${URL}"
|
@ -1,64 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
INSTALLDIR="/home/${USER}/.voidlinux"
|
||||
|
||||
|
||||
if [ ! -f /usr/bin/git ];then
|
||||
printf "${LCYAN}Installing git...${NC}\n"
|
||||
sudo xbps-install -S git
|
||||
fi
|
||||
|
||||
if [ ! -d ${INSTALLDIR} ];then
|
||||
printf "${LCYAN}Creating install folder...${NC}\n"
|
||||
mkdir -p ${INSTALLDIR}
|
||||
fi
|
||||
|
||||
cd ${INSTALLDIR}
|
||||
|
||||
if [ ! -d void-packages ];then
|
||||
printf "${LCYAN}Cloning Void Packages...${NC}\n"
|
||||
git clone https://github.com/voidlinux/void-packages.git
|
||||
fi
|
||||
|
||||
|
||||
|
||||
cd void-packages
|
||||
|
||||
git pull origin master
|
||||
|
||||
printf "${YELLOW}Bootsrapping chrooted system...${NC}\n"
|
||||
|
||||
./xbps-src binary-bootstrap
|
||||
|
||||
printf "${LCYAN}Checking for boostrap package updates${NC}\n"
|
||||
|
||||
./xbps-src bootstrap-update
|
||||
|
||||
echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf
|
||||
|
||||
printf "${LGREEN}Building Google Chrome...${NC}\n"
|
||||
|
||||
./xbps-src pkg google-chrome
|
||||
|
||||
sudo xbps-install -y -R hostdir/binpkgs/nonfree google-chrome
|
||||
|
||||
printf "${LGREEN}There you go Leslie!${NC}\n"
|
||||
|
||||
|
||||
|
60
uppy.sh
60
uppy.sh
@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONFIG="~/config/.uppy.conf"
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
if [ ! -f /usr/bin/apt ];then
|
||||
echo -e "${LRED}Apt is missing!..exiting!${NC}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f ${CONFIG} ];then
|
||||
echo -e "${LBLUE}Creating config in ${CONFIG}${NC}\n"
|
||||
touch ${CONFIG}
|
||||
fi
|
||||
|
||||
if grep -Fxq "AUTOCONFIRM='true'" ${CONFIG};then
|
||||
AUTO="yes"
|
||||
|
||||
else
|
||||
|
||||
echo -n "Do you want to skip confirmations?[n/Y]"
|
||||
read confirm
|
||||
if [ "${confirm}" = "y" ];then
|
||||
|
||||
echo "AUTOCONFIRM='true'" > ${CONFIG}
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo -e "${LBLUE}Checking Sources...${NC}\n"
|
||||
|
||||
sudo apt update
|
||||
|
||||
echo -e "${LBLUE}Starting Upgrade...${NC}\n"
|
||||
|
||||
if [ "${AUTO}" = "yes" ];then
|
||||
|
||||
sudo apt -y upgrade
|
||||
|
||||
else
|
||||
|
||||
sudo apt upgrade
|
||||
|
||||
fi
|
||||
|
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/bin/rsstail ];then
|
||||
|
||||
feed="https://github.com/voidlinux/void-packages/commits/master.atom"
|
||||
updatedpkgs="$(rsstail -1 -u ${feed} | grep -e "Update" -e "update" | wc -l)"
|
||||
newpkgs="$(rsstail -1 -u ${feed} | grep -e "New" -e "new" | wc -l)"
|
||||
sysupdates="$(xbps-install -Snu | wc -l)"
|
||||
|
||||
|
||||
notify-send """REPO COMMITS:
|
||||
Updated Packages: ${updatedpkgs}
|
||||
New Packages: ${newpkgs}
|
||||
|
||||
SYSTEM UPDATES:
|
||||
Currently Available: ${sysupdates}"""
|
||||
|
||||
echo """REPO COMMITS:
|
||||
Updated Packages: ${updatedpkgs}
|
||||
New Packages: ${newpkgs}
|
||||
|
||||
SYSTEM UPDATES:
|
||||
Currently Available: ${sysupdates}"""
|
||||
elif [ ! -f /usr/bin/rsstail ];then
|
||||
echo "[ERROR] This script requires the package: 'rsstail'"
|
||||
exit 0;
|
||||
else
|
||||
echo "Something went wrong when checking for: /usr/bin/rsstail"
|
||||
exit 0;
|
||||
fi
|
@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
printf "${LGREEN}Adding Microsoft asc key file...${NC}\n"
|
||||
|
||||
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
|
||||
|
||||
printf "${LGREEN}Adding VSCODE OpenSuse Repository...${NC}\n"
|
||||
|
||||
printf "${LBLUE}Syncing repositories...(with sudo)${NC}\n"
|
||||
|
||||
sudo zypper refresh
|
||||
|
||||
printf "${YELLOW} Do you want to install Visual Studio Code now?[y/n]: ${NC}"
|
||||
read choice
|
||||
|
||||
if [ "${choice}" = "n" ];then
|
||||
exit 0;
|
||||
elif [ "${choice}" = "y" ];then
|
||||
sudo zypper install code
|
||||
else
|
||||
printf "${LRED}Please enter lowercase y or n${NC}\n"
|
||||
exit 0;
|
||||
fi
|
164
wire-build.sh
164
wire-build.sh
@ -1,164 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP="wire-desktop"
|
||||
NPM_DIR="/usr/bin/npm"
|
||||
BIN_DIR="/home/${USER}/wire-packages"
|
||||
PACKAGE_DEFAULT_DIR="$(pwd)/wrap/dist"
|
||||
SUPER_USER_CMD="sudo"
|
||||
REPO_URL="https://github.com/wireapp/${APP}.git"
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
printf "${LRED}Do not run this script as root${NC}\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check_repo(){
|
||||
if [ ! -d ${APP} ];then
|
||||
git clone ${REPO_URL}
|
||||
|
||||
elif [ -d .git ];then
|
||||
printf "\n${LRED}This is already a Git repository!${NC}\n"
|
||||
|
||||
fi
|
||||
}
|
||||
check_sudo(){
|
||||
if [ ! -f /usr/bin/sudo ];then
|
||||
SUPER_USER_CMD="su -c"
|
||||
fi
|
||||
}
|
||||
apt_install(){
|
||||
local PACKAGES="git make nodejs npm"
|
||||
|
||||
printf "${LCYAN}Fetching dependencies${NC}\n\n"
|
||||
${SUPER_USER_CMD} apt install ${PACKAGES}
|
||||
}
|
||||
|
||||
dnf_install(){
|
||||
local PACKAGES='rpm-build rpmdevtools make nodejs npm nss libXScrnSaver git'
|
||||
|
||||
printf "${LCYAN}Fetching dependencies${NC}\n\n"
|
||||
${SUPER_USER_CMD} dnf install ${PACKAGES}
|
||||
}
|
||||
|
||||
zypper_install(){
|
||||
local PACKAGES="make git nodejs npm"
|
||||
|
||||
printf "${LCYAN}Fetching dependencies${NC}\n\n"
|
||||
${SUPER_USER_CMD} 'zypper install "${PACKAGES}"'
|
||||
}
|
||||
|
||||
check_deps(){
|
||||
declare -a FIND_PACKAGE_MANAGER=(
|
||||
"apt"
|
||||
"dnf"
|
||||
"zypper")
|
||||
|
||||
for i in ${FIND_PACKAGE_MANAGER[@]};do
|
||||
PACKAGE_MANAGER=$(which ${i} 2> /dev/null)
|
||||
echo "$PACKAGE_MANAGER"
|
||||
if [ -n "${PACKAGE_MANAGER}" ];then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "${PACKAGE_MANAGER}" = "/usr/bin/apt" ]];then
|
||||
apt_install
|
||||
|
||||
elif [ "${PACKAGE_MANAGER}" = "/usr/bin/dnf" ];then
|
||||
dnf_install
|
||||
|
||||
elif [[ "${PACKAGE_MANAGER}" = "/usr/bin/xbps-install" ]];then
|
||||
xbps_install
|
||||
|
||||
elif [[ "${PACKAGE_MANAGER}" = "/usr/bin/zypper" ]];then
|
||||
zypper_install
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
build_deb(){
|
||||
local ARCH="x64"
|
||||
local TARGET="deb"
|
||||
local UPDATE_OPTS="'clean:linux' 'update-keys' 'release-prod'"
|
||||
local BUILD_OPTS="--arch=${ARCH} --target=${TARGET} 'electronbuilder:linux_other'"
|
||||
|
||||
npm install
|
||||
npm update
|
||||
sudo npm install -g grunt
|
||||
sudo grunt 'clean:linux' 'update-keys' 'release-prod' 'bundle'
|
||||
sudo grunt --arch=${ARCH} --target=${TARGET} 'electronbuilder:linux_other'
|
||||
sudo mv -v ${PACKAGE_DEFAULT_DIR}/*.${TARGET} ${BIN_DIR}
|
||||
}
|
||||
|
||||
build_rpm(){
|
||||
local ARCH="x64"
|
||||
local TARGET="rpm"
|
||||
local UPDATE_OPTS="'clean:linux' 'update-keys' 'release-prod'"
|
||||
local BUILD_OPTS="--arch=${ARCH} --target=${TARGET} 'electronbuilder:linux_other'"
|
||||
|
||||
npm install
|
||||
npm update
|
||||
npm install grunt
|
||||
grunt 'clean:linux' 'update-keys' 'release-prod'
|
||||
grunt --arch=${ARCH} --target=${TARGET} 'electronbuilder:linux_other'
|
||||
mv -v ${PACKAGE_DEFAULT_DIR}/*.${TARGET} ${BIN_DIR}
|
||||
}
|
||||
|
||||
git_pull(){
|
||||
if [ -d .git ];then
|
||||
git stash
|
||||
git pull origin master
|
||||
fi
|
||||
}
|
||||
|
||||
main(){
|
||||
if [ ! -d ${BIN_DIR} ];then
|
||||
mkdir -pv ${BIN_DIR}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
case $1 in
|
||||
all | -a) check_deps && git_pull && build_rpm && build_deb
|
||||
;;
|
||||
|
||||
deb | -d) git_pull && build_deb
|
||||
;;
|
||||
|
||||
rpm | -r) check_deps && git_pull && build_rpm
|
||||
;;
|
||||
|
||||
clone | -c) check_repo
|
||||
;;
|
||||
|
||||
*)
|
||||
printf "\n\n"
|
||||
printf "Usage: $0 [-a/all | -d/deb | -r/rpm ]\n\n"
|
||||
|
||||
printf " -a | all build all package formats\n"
|
||||
printf " -d | deb build only DEB package format\n"
|
||||
printf " -r | rpm build only RPM package format\n"
|
||||
printf " -c | clone clone 'wire-desktop' from Github\n\n"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
main ${1}
|
||||
|
Loading…
x
Reference in New Issue
Block a user