Compare commits
4 Commits
981f24ec8e
...
feature
Author | SHA1 | Date | |
---|---|---|---|
995d5772ff | |||
97c1dfa3d3 | |||
9b81f94eae | |||
3fd6313c1e |
46
.todo2
46
.todo2
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"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~
45
.todo2~
@@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@@ -31,7 +31,7 @@ withLoop(){
|
|||||||
clear
|
clear
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "Pinging ${site} until a connection is reached"
|
echo "Pinging: ${site}"
|
||||||
${pingcmd} ${site} &>/dev/null
|
${pingcmd} ${site} &>/dev/null
|
||||||
if [ $? = "2" ];then
|
if [ $? = "2" ];then
|
||||||
echo
|
echo
|
94
build_voild_iso.sh
Executable file
94
build_voild_iso.sh
Executable file
@@ -0,0 +1,94 @@
|
|||||||
|
#!/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}"
|
37
dino-git.sh
37
dino-git.sh
@@ -1,37 +0,0 @@
|
|||||||
#!/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
45
doppler.sh
@@ -1,45 +0,0 @@
|
|||||||
#!/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
|
|
19
func_test.sh
Executable file
19
func_test.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/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
|
22
genswap.sh
22
genswap.sh
@@ -41,8 +41,8 @@ function autoSwap(){
|
|||||||
echo -e "${LGREEN}------------------------------------------------------------------${NC}"
|
echo -e "${LGREEN}------------------------------------------------------------------${NC}"
|
||||||
read
|
read
|
||||||
|
|
||||||
echo -e "${LCYAN}\nCreating file ${SWAPPATH}${SWAPNAME}...\n${NC}"
|
echo -e "${LCYAN}\nCreating file in ${SWAPPATH}...\n${NC}"
|
||||||
dd if=/dev/zero of=${SWAPPATH}${SWAPNAME} count=${TOTALRAM} bs=1MiB
|
fallocate -l ${TOTALRAM}M ${SWAPPATH}${SWAPNAME}
|
||||||
ls -lh ${SWAPPATH}${SWAPNAME}
|
ls -lh ${SWAPPATH}${SWAPNAME}
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
@@ -85,20 +85,10 @@ function autoSwap(){
|
|||||||
echo -e "${LRED}Swap line does not exist in /etc/fstab, please manually check this.${NC}\n"
|
echo -e "${LRED}Swap line does not exist in /etc/fstab, please manually check this.${NC}\n"
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e "${LGREEN}Swap successfully added to /etc/fstab! Reboot to verify success...${NC}\n"
|
echo -e "${LGREEN}Swap successfully added to /etc/fstab${NC}\n"
|
||||||
|
|
||||||
echo -e "${YELLOW}Do you want to reboot your system now?(n/Y): ${NC}"
|
echo -e "\n${LGREEN}Swapfile setup complete${NC}\n"
|
||||||
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,4 +214,4 @@ case "${1}" in
|
|||||||
*)
|
*)
|
||||||
help
|
help
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
56
gitbucket.sh
Executable file
56
gitbucket.sh
Executable file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/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
Executable file
112
goup.sh
Executable file
@@ -0,0 +1,112 @@
|
|||||||
|
#!/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
|
50
install-wire.sh
Executable file
50
install-wire.sh
Executable file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/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
|
7
loadsshkeys.sh
Executable file
7
loadsshkeys.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
KEYFILE="/home/mollusk/.ssh/gitbutter_thinkpad"
|
||||||
|
|
||||||
|
ssh-add ${KEYFILE}
|
||||||
|
|
||||||
|
eval `ssh-agent`
|
11
machine.sh
Executable file
11
machine.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/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
|
4
nmip.sh
4
nmip.sh
@@ -19,10 +19,8 @@ NC='\033[0m' # No Color
|
|||||||
|
|
||||||
if [ ! -f /usr/bin/nmap ];then
|
if [ ! -f /usr/bin/nmap ];then
|
||||||
printf "${LRED} Nmap is not installed...${NC}\n"
|
printf "${LRED} Nmap is not installed...${NC}\n"
|
||||||
elif [ ! -z "${1}" ];then
|
|
||||||
nmap -sP "${1}/24"
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
printf "${LGREEN}Looking up ${lanip}...${NC}\n"
|
printf "${LGREEN}Looking up ${lanip}...${NC}\n"
|
||||||
nmap -sP ${lanip}/24 # Use sudo to get names of devies
|
nmap -sP ${lanip}/24 # Use sudo to get names of devies
|
||||||
fi
|
fi
|
||||||
|
8
packages.sh
Executable file
8
packages.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/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}
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
pkgname="master"
|
pkgname="master"
|
||||||
pkgurl="git@github.com:cilynx/rtl88x2bu/${pkgname}.zip"
|
pkgurl="https://github.com/cilynx/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959/archive/${pkgname}.zip"
|
||||||
installcmd="dnf install"
|
installcmd="dnf install"
|
||||||
installcmdextra="dnf group install"
|
installcmdextra="dnf group install"
|
||||||
pkgdeps="wget unzip dnsmasq hostapd bc dkms kernel-headers rsync"
|
pkgdeps="wget unzip dnsmasq hostapd bc dkms kernel-headers rsync"
|
||||||
|
12
status-test.sh
Executable file
12
status-test.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
xbps-install -Su
|
||||||
|
|
||||||
|
if [ $? = 0 ];then
|
||||||
|
echo "Success!"
|
||||||
|
|
||||||
|
elif [ $? = 1 ];then
|
||||||
|
echo "Nothing to see here"
|
||||||
|
fi
|
68
svc.sh
68
svc.sh
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# SVC - SV Commander - frontend for the sv command
|
# SVC - SV Commander - frontend for the sv command
|
||||||
|
|
||||||
###############################################################################################
|
###############################################################################################
|
||||||
## Copyright (c) 2015, Justin Moore
|
## Copyright (c) 2015 - 2020, Justin Moore
|
||||||
##
|
##
|
||||||
## Permission to use, copy, modify, and/or distribute this software
|
## Permission to use, copy, modify, and/or distribute this software
|
||||||
## for any purpose with or without fee is hereby granted,
|
## for any purpose with or without fee is hereby granted,
|
||||||
@@ -47,8 +47,8 @@ stop Stop an enabled service
|
|||||||
enable Symenlink directory/file to /var/service
|
enable Symenlink directory/file to /var/service
|
||||||
disable Remove symlink from /var/service
|
disable Remove symlink from /var/service
|
||||||
enabled View synlinked paths of all services
|
enabled View synlinked paths of all services
|
||||||
ls List enabled and unenabled service files
|
ls List enabled and disabled service files
|
||||||
up Show status of running services
|
up Show status of running services
|
||||||
|
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
@@ -57,45 +57,45 @@ case $1 in
|
|||||||
|
|
||||||
enable | --enable-service )
|
enable | --enable-service )
|
||||||
ln -v -s /etc/sv/"${2}" /var/service/
|
ln -v -s /etc/sv/"${2}" /var/service/
|
||||||
;;
|
;;
|
||||||
|
|
||||||
disable | --remove-service )
|
disable | --remove-service )
|
||||||
rm -v /var/service/"${2}"
|
rm -v /var/service/"${2}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
enabled | --enabled-services )
|
enabled | --enabled-services )
|
||||||
cd /etc/sv && find -xtype l -exec ls -l {} \;
|
cd /etc/sv && find -xtype l -exec ls -l {} \;
|
||||||
;;
|
;;
|
||||||
|
|
||||||
list | ls | --list )
|
list | ls | --list )
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -e "${LGREEN}Available Services (/etc/sv/):${NC}\n"
|
echo "${LGREEN}Available Services (/etc/sv/):${NC}\n"
|
||||||
ls /etc/sv
|
ls /etc/sv
|
||||||
echo
|
echo
|
||||||
echo -e "${LCYAN}Enabled Services (/var/service):${NC}\n"
|
echo "${LCYAN}Enabled Services (/var/service):${NC}\n"
|
||||||
echo
|
echo
|
||||||
ls /var/service
|
ls /var/service
|
||||||
echo
|
echo
|
||||||
;;
|
;;
|
||||||
|
|
||||||
up )
|
up )
|
||||||
sv s /var/service/*
|
sv s /var/service/*
|
||||||
;;
|
;;
|
||||||
|
|
||||||
start )
|
start )
|
||||||
sv start "${2}"
|
sv start "${2}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
restart )
|
restart )
|
||||||
sv restart "${2}"
|
sv restart "${2}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
stop )
|
stop )
|
||||||
sv stop "${2}"
|
sv stop "${2}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--help | -h | help )
|
*)
|
||||||
help
|
help
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
126
telegram-installer.sh
Executable file
126
telegram-installer.sh
Executable file
@@ -0,0 +1,126 @@
|
|||||||
|
#!/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
|
48
tux-setup.sh
Executable file
48
tux-setup.sh
Executable file
@@ -0,0 +1,48 @@
|
|||||||
|
#!/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
|
7
tuxrss.sh
Executable file
7
tuxrss.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
URL="http://homebutter.com/feed/tux.git"
|
||||||
|
|
||||||
|
|
||||||
|
rsstail -1 -u "${URL}"
|
64
update-chrome.sh
Executable file
64
update-chrome.sh
Executable file
@@ -0,0 +1,64 @@
|
|||||||
|
#!/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
Normal file
60
uppy.sh
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
#!/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
|
||||||
|
|
30
voidrepo-check.sh
Executable file
30
voidrepo-check.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/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
|
38
vscode-suse-repo.sh
Executable file
38
vscode-suse-repo.sh
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/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
Executable file
164
wire-build.sh
Executable file
@@ -0,0 +1,164 @@
|
|||||||
|
#!/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}
|
||||||
|
|
Reference in New Issue
Block a user