Merge all
Former-commit-id: 188cb905a0ad28f415e54b15ae3f8154e2ee47a0
This commit is contained in:
commit
0a9cb61549
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ autox11vnc/autox11vnc
|
||||
.vscode
|
||||
julia-1.1.0
|
||||
julia-1.1.1
|
||||
bfg-*
|
||||
|
48
Gohunt.sh
48
Gohunt.sh
@ -1,48 +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
|
||||
##############################
|
||||
|
||||
createGopath(){
|
||||
echo -e "\nYour GOPATH is not set, should we set it now?: "
|
||||
read choice
|
||||
|
||||
if [ "${choice}" = "y" ] || [ "${choice}" = "Y" ];then
|
||||
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
|
||||
if grep -Fx "${gPATH}" ~/.bashrc;then
|
||||
echo -e "${LGREEN}\nGOPATH is set in bashrc\n${NC}"
|
||||
else
|
||||
echo -e "\nPlease set the GOPATH in .bashrc\n\n"
|
||||
echo -e "\n'\nexport PATH=$PATH:/usr/local/go/bin'\n"
|
||||
fi
|
||||
else
|
||||
echo "\n"
|
||||
|
||||
|
||||
}
|
||||
|
||||
checkPath(){
|
||||
gPATH='export PATH=$PATH:/usr/local/go/bin'
|
||||
if grep -Fx "${gPATH}" ~/.bashrc;then
|
||||
echo -e "${LGREEN}\nGOPATH is set in bashrc\n${NC}"
|
||||
else
|
||||
createGopath
|
||||
|
||||
|
||||
}
|
||||
|
||||
checkDir(){
|
||||
if [ ! -d ${GOPATH}]
|
||||
}
|
@ -1,34 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
NAME="crystal"
|
||||
VERSION="0.22.0-1"
|
||||
VERSION="0.28.0"
|
||||
REV="1"
|
||||
ARCH="x86_64"
|
||||
PREFIX="/usr"
|
||||
TMP="/tmp"
|
||||
URL="https://github.com/crystal-lang/crystal/releases/download/0.22.0/${NAME}-${VERSION}-linux-${ARCH}.tar.gz"
|
||||
URL="https://github.com/crystal-lang/crystal/releases/download/${VERSION}/${NAME}-${VERSION}-${REV}-linux-${ARCH}.tar.gz"
|
||||
|
||||
|
||||
|
||||
download_(){
|
||||
printf "Downloading ${NAME}-${VERSION}-${ARCH}...\n"
|
||||
wget ${URL} -P ${TMP}
|
||||
if [ ! -f ${TMP}/${NAME}-${VERSION}-${REV}-linux-${ARCH}.tar.gz ];then
|
||||
printf "Downloading ${NAME}-${VERSION}-${ARCH}...\n"
|
||||
wget ${URL} -P ${TMP}
|
||||
|
||||
else
|
||||
echo "${NAME}-${VERSION}-${REV}-linux-${ARCH}tar.gz" exists
|
||||
fi
|
||||
}
|
||||
|
||||
extract_(){
|
||||
printf "Ectracting archive file to ${TMP}...\n"
|
||||
cd ${TMP}
|
||||
tar xvf ${NAME}-${VERSION}-linux-${ARCH}tar.gz
|
||||
tar -xzvf ${NAME}-${VERSION}-${REV}-linux-${ARCH}.tar.gz
|
||||
}
|
||||
|
||||
install_(){
|
||||
printf "Copying files to system..\n"
|
||||
cd ${TMP}/${NAME}-${VERSION}/embedded
|
||||
cp -r {bin,include,lib,share} ${PREFIX}/
|
||||
cd ${TMP}/${NAME}-${VERSION}-${REV}
|
||||
cp -r {bin,lib,share} ${PREFIX}/
|
||||
|
||||
}
|
||||
|
||||
|
||||
link_(){
|
||||
|
||||
}
|
||||
|
||||
download_
|
||||
extract_
|
||||
install_
|
||||
|
34
grss.sh
34
grss.sh
@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
FEED_TITLE="Jitty Scripts"
|
||||
FEED_URL="http://gitbutter.pw/feed/jitty-scripts.git"
|
||||
RSS_READER="rsstail"
|
||||
READER_OPTS="-1 -u"
|
||||
|
||||
# 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/${RSS_READER} ];then
|
||||
printf "${LCYAN}Fetching feed for: ${FEED_TITLE}${NC}\n"
|
||||
if [ "${RSS_READER}" = "rsstail" ];then
|
||||
|
||||
rsstail ${READER_OPTS} ${FEED_URL}
|
||||
else
|
||||
${RSS_READER} ${READER_OPTS}
|
||||
fi
|
||||
|
||||
else
|
||||
echo "${RSS_READER} is not installed"
|
||||
fi
|
66
jittypod.sh
66
jittypod.sh
@ -1,66 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
function main(){
|
||||
|
||||
echo "---------------------"
|
||||
echo " JittyPod v0.1 "
|
||||
echo "---------------------"
|
||||
|
||||
|
||||
printf "[1] - Add feeds\n\n"
|
||||
printf "[2] - Show Podcasts\n\n"
|
||||
|
||||
printf ">> "
|
||||
read choice
|
||||
|
||||
|
||||
|
||||
if [ "${choice}" = "1" ];then
|
||||
add_feeds
|
||||
|
||||
elif [ "${choice}" = "2" ];then
|
||||
show_podcasts
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function add_feeds(){
|
||||
while true;do
|
||||
echo
|
||||
printf "Podcast Name: "
|
||||
read podname
|
||||
|
||||
printf "Feed URL: "
|
||||
read feed
|
||||
|
||||
greg add "${podname}" "${feed}"
|
||||
if [ $? != 0 ];then
|
||||
printf "Greg failed to pull the feed"
|
||||
else
|
||||
echo
|
||||
echo "Podcast: ${podname} added!"
|
||||
echo "| Feed: ${feed}"
|
||||
fi
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
function show_podcasts(){
|
||||
echo
|
||||
echo "-----------------"
|
||||
echo " Podcasts "
|
||||
echo "-----------------"
|
||||
echo
|
||||
greg info
|
||||
echo
|
||||
main
|
||||
}
|
||||
|
||||
function download_feeds(){
|
||||
echo
|
||||
}
|
||||
|
||||
main
|
@ -1,106 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION="0.5.0"
|
||||
DOWN_DIR="/tmp"
|
||||
VPATH="0.5"
|
||||
OUTNAME="julia-${VERSION}"
|
||||
ARC=$(getconf LONG_BIT)
|
||||
PACKAGE64="julia-${VERSION}-linux-x86_64.tar.gz"
|
||||
PACKAGE32="julia-${VERSION}-linux-i686.tar.gz"
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "You are not root!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
downLoad()
|
||||
{
|
||||
|
||||
if [ $ARC = "64" ];then
|
||||
wget https://julialang.s3.amazonaws.com/bin/linux/x${ARC}/${VPATH}/julia-${VERSION}-linux-x86_${ARC}.tar.gz -P ${DOWN_DIR}
|
||||
|
||||
elif [ $ARC = "32" ];then
|
||||
wget https://julialang.s4.amazonaws.com/bin/linux/x86/${VPATH}/julia-${VERION}-linux-${ARC}.tar.gz -P ${DOWN_DIR}
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
extrPack()
|
||||
{
|
||||
if [ -f ${DOWN_DIR}/${PACKAGE64} ];then
|
||||
mkdir ${DOWN_DIR}/${OUTNAME}
|
||||
tar xvzf ${DOWN_DIR}/${PACKAGE64} -C ${DOWN_DIR}/${OUTNAME} --strip-components=1
|
||||
|
||||
elif [ -f ${DOWN_DIR}/${PACKAGE32} ];then
|
||||
mkdir ${DOWN_DIR}/${OUTNAME}
|
||||
tar xvzf ${DOWN_DIR}/${PACKAGE32} - C ${DOWN_DIR}/${OUTNAME} --strip-components=1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
installJulia()
|
||||
{
|
||||
cd ${DOWN_DIR}/${OUTNAME}
|
||||
cp -v -R bin/* /usr/bin/
|
||||
cp -v -R etc/* /etc/
|
||||
echo "hi"
|
||||
cp -v -R include/* /include/
|
||||
cp -v -R lib/* /lib
|
||||
cp -v -R share/* /usr/share
|
||||
cd ${DOWN_DIR}/${OUTNAME}
|
||||
cp -v -R bin/* /usr/bin/
|
||||
cp -v -R etc/* /etc/
|
||||
cp -v -R include/* /include/
|
||||
cp -v -R lib/* /lib
|
||||
cp -v -R share/* /usr/share
|
||||
|
||||
}
|
||||
|
||||
removeJulia()
|
||||
{
|
||||
rm -v -R /usr/bin/julia
|
||||
rm -v -R /usr/bin/julia-debug
|
||||
rm -v -R /usr/include/julia
|
||||
rm -v -R /usr/lib/julia
|
||||
rm -v -R /etc/julia
|
||||
rm -v -R /usr/share/julia
|
||||
}
|
||||
main()
|
||||
{
|
||||
clear
|
||||
echo "=========================="
|
||||
echo " JULIA INSTALLER"
|
||||
echo "=========================="
|
||||
echo
|
||||
echo "[1] - Install"
|
||||
echo "[2] - Remove"
|
||||
echo
|
||||
echo "[q] - Quit"
|
||||
echo
|
||||
echo -n "-> "
|
||||
read choice
|
||||
|
||||
if [ ${choice} = "1" ];then
|
||||
downLoad
|
||||
extrPack
|
||||
installJulia
|
||||
echo
|
||||
echo -n "Would you like to run Julia now (y/n)?: "
|
||||
read runjul
|
||||
|
||||
if [ ${runjul} = "y" ];then
|
||||
julia
|
||||
exit 0;
|
||||
elif [ ${runjul} = "n" ];then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
elif [ ${choice} = "2" ];then
|
||||
removeJulia
|
||||
exit 0;
|
||||
elif [ ${choice} = "q" ];then
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
46
trimrepo.sh
Executable file
46
trimrepo.sh
Executable file
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
chk_deps()
|
||||
{
|
||||
if [ ! -f /usr/bin/tux ] || [ ! -f /usr/bin/sudo ];then
|
||||
echo "Please install: tuxc & sudo, one of them was not found"
|
||||
exit 1
|
||||
|
||||
|
||||
sudo tux i openjdk-8-jre wget
|
||||
fi
|
||||
}
|
||||
|
||||
dl_bins()
|
||||
{
|
||||
file_name="bfg"
|
||||
file_version="1.13.0"
|
||||
dldest="./"
|
||||
dltool="wget"
|
||||
dlurl="https://repo1.maven.org/maven2/com/madgag/bfg/${file_version}/${file_name}-${file_version}.jar"
|
||||
|
||||
if [ -f ./bfg-1.13.0.jar ];then
|
||||
echo "${file_name}-${file_version} already exists"
|
||||
return
|
||||
elif [ ${dltool} = "wget" ];then
|
||||
${dltool} ${dlurl} -P ${dldest}
|
||||
|
||||
elif [ ${dltool} = "aria2c" ];then
|
||||
${dltool} -x 10 -j 10 ${dlurl} -d ${dldest}
|
||||
fi
|
||||
}
|
||||
|
||||
chk_deps
|
||||
dl_bins
|
||||
|
||||
trim_size="10M"
|
||||
|
||||
if [ ! -d .git/ ];then
|
||||
echo "This is not a git repository"
|
||||
|
||||
else
|
||||
java -jar ./${file_name}-${file_version}.jar --strip-blobs-bigger-than ${trim_size}
|
||||
git reflog expire --expire=now --all && git gc --prune=now --aggressive
|
||||
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user