Skip to content

Commit

Permalink
Cleaning a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ShutdownRepo committed Sep 13, 2023
1 parent 07cb128 commit 1c9e6ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 91 deletions.
86 changes: 0 additions & 86 deletions sources/install/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,6 @@ function fapt() {
/usr/local/sbin/apt-fast install -y --no-install-recommends "$@"
}

function fapt-noexit() {
# This function tries the same thing as fapt but doesn't exit in case something's wrong.
# Example: a package exists in amd64 but not arm64. I didn't find a way of knowing that beforehand.
colorecho "Installing (no-exit) apt package(s): $*"
apt-get install -y --no-install-recommends "$*" || echo -e "${RED}[EXEGOL ERROR] Package(s) $* probably doesn't exist for architecture $(uname -m), or no installation candidate was found, or some other error...${NOCOLOR}" 2>&1
}

function fapt-history() {
fapt "$@"
for i in "$@"; do
add-history "$i"
done
}

function fapt-aliases() {
fapt "$@"
for i in "$@"; do
add-aliases "$i"
done
}

function fapt-history-aliases() {
fapt "$@"
for i in "$@"; do
add-history "$i"
add-aliases "$i"
done
}

function set_go_env() {
colorecho "Setting golang environment variables for installation"
export GO111MODULE=on
Expand All @@ -87,61 +58,4 @@ function set_ruby_env() {
colorecho "Setting ruby environment variables for installation"
source /usr/local/rvm/scripts/rvm
rvm use 3.0.0@default
}

function install_pipx_git_tool() {
colorecho "Installing $2 with pipx"
python3 -m pipx install $1
if [ "$3" ]
then
add-test-command $3
fi
if [[ "$*" == *"history"* ]]
then
add-history $2
fi
}

function install_go_tool() {
colorecho "Installing $2 with Golang"
go install -v $1
if [ "$3" ]
then
add-test-command $3
fi
if [[ "$*" == *"history"* ]]
then
add-history $2
fi
}

function install_pipx_tool() {
colorecho "Installing $1 with pipx"
python3 -m pipx install $1
if [ "$2" ]
then
add-test-command $2
fi
if [[ "$*" == *"history"* ]]
then
add-history $1
fi
}

function install_apt_tool() {
colorecho "Installing $1 with apt"
fapt $1
if [ "$2" ]
then
add-test-command $2
fi
if [[ "$*" == *"history"* ]]
then
add-history $1
fi

if [[ "$*" == *"aliases"* ]]
then
add-aliases $1
fi
}
20 changes: 15 additions & 5 deletions sources/install/package_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,23 @@ function package_base() {
less x11-apps net-tools vim nano jq iputils-ping iproute2 tidy mlocate libtool \
dos2unix ftp sshpass telnet nfs-common ncat netcat-traditional socat rdate putty \
screen p7zip-full p7zip-rar unrar xz-utils xsltproc parallel tree ruby ruby-dev ruby-full bundler \
nim perl libwww-perl openjdk-17-jre openjdk-11-jre openjdk-11-jdk-headless openjdk-17-jdk-headless openjdk-11-jdk openjdk-17-jdk openvpn openresolv logrotate tmux tldr bat python3-pyftpdlib libxml2-utils \
virtualenv chromium libsasl2-dev python-dev libldap2-dev libssl-dev isc-dhcp-client sqlite3
nim perl libwww-perl openjdk-17-jre openjdk-11-jre openjdk-11-jdk-headless openjdk-17-jdk-headless \
openjdk-11-jdk openjdk-17-jdk openvpn openresolv logrotate tmux tldr bat python3-pyftpdlib libxml2-utils \
virtualenv chromium libsasl2-dev python-dev libldap2-dev libssl-dev isc-dhcp-client sqlite3 dnsutils samba \
ssh snmp faketime php python3 grc emacs-nox xsel
chsh -s /bin/zsh

fapt-history dnsutils samba ssh snmp faketime
fapt-aliases php python3 grc emacs-nox xsel
add-history dnsutils
add-history samba
add-history ssh
add-history snmp
add-history faketime

add-aliases php
add-aliases python3
add-aliases grc
add-aliases emacs-nox
add-aliases xsel
add-aliases pyftpdlib

install_rust_cargo
Expand Down Expand Up @@ -322,7 +333,6 @@ function package_base() {
add-test-command "bat --version"
DEBIAN_FRONTEND=noninteractive fapt macchanger # Macchanger
install_gf # wrapper around grep
fapt-noexit rar # rar (Only AMD)
install_firefox

cp -v /root/sources/assets/grc/grc.conf /etc/grc.conf # grc
Expand Down

0 comments on commit 1c9e6ca

Please sign in to comment.