Fixed folder name

This commit is contained in:
2024-04-04 12:09:20 +02:00
parent 433ec62e0e
commit 32a323c76b
6 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
#!/bin/bash
#### Variables
APT_UPDATE="apt -y update"
APT_INST="apt -y install"
APT_PURGE="apt -y purge"
APT_REMOVE="apt -y autoremove"
PKG_DEPS="curl wget git php php-cli php-curl php-mbstring php-readline php-mysql php-pgsql php-sqlite3 php-xml php-zip php-intl"
BIN_DEPS=(composer)
#### Functions
check_root() {
if [ "$EUID" -ne 0 ]; then
echo "Must be root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true
do
read -rN1 input
case $input in
[yY][eE][sS]|[yY])
return 0
break
;;
[nN][oO]|[nN])
return 1
;;
esac
done
}
check_deps_pkg() {
for NAME in "${PKG_DEPS[@]}"
do
dpkg -l $NAME > /dev/null
CODE=$?
if ! [ "$CODE" -ne 1 ]; then
echo -ne "\nInstall $NAME ? "
if choice 2>/dev/null; then
echo -ne "\n$APT_INST $NAME\n"
$APT_INST $NAME
else
echo -ne "\n\nAbort install script, package $NAME is required for work $PKG_NAME.\n"
exit 1;
fi
fi
done
}
check_deps_bin() {
for NAME in "${BIN_DEPS[@]}"
do
if ! [ -x "$(command -v $NAME)" ]; then
echo "Error: $NAME is not installed. Please install $NAME before start this script." >&2
exit 1;
fi
done
}
#### Main
check_root
check_deps_bin
check_deps_pkg
echo -ne "\nNow is all ready for create new project, example:\n\ncomposer create-project codeigniter4/appstarter project-root\n"

View File

@@ -0,0 +1,63 @@
#!/bin/bash
#### Variables
APT_INST="apt -y install"
PKG_DEPS=(php)
#### Functions
check_root() {
if [ "$EUID" -ne 0 ]; then
echo "Must be root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true
do
read -rN1 input
case $input in
[yY][eE][sS]|[yY])
return 0
break
;;
[nN][oO]|[nN])
return 1
;;
esac
done
}
check_deps_pkg() {
for NAME in "${PKG_DEPS[@]}"
do
dpkg -l $NAME > /dev/null
CODE=$?
if ! [ "$CODE" -ne 1 ]; then
echo -ne "\nInstall $NAME ? "
if choice 2>/dev/null; then
echo -ne "\n$APT_INST $NAME\n"
$APT_INST $NAME
else
echo -ne "\n\nAbort install script, package $NAME is required for work $PKG_NAME.\n"
exit 1;
fi
fi
done
}
composer_install() {
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer
}
#### Main
check_root
check_deps_pkg
composer_install

View File

@@ -0,0 +1,74 @@
#!/bin/bash
#### Variables
APT_UPDATE="apt -y update"
APT_INST="apt -y install"
APT_PURGE="apt -y purge"
APT_REMOVE="apt -y autoremove"
PKG_NAME="dbeaver-ce"
PKG_DEPS=(default-jdk)
#### Functions
check_root() {
if [ "$EUID" -ne 0 ]; then
echo "Must be root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true
do
read -rN1 input
case $input in
[yY][eE][sS]|[yY])
return 0
break
;;
[nN][oO]|[nN])
return 1
;;
esac
done
}
check_deps_pkg() {
for NAME in "${PKG_DEPS[@]}"
do
dpkg -l $NAME > /dev/null
CODE=$?
if ! [ "$CODE" -ne 1 ]; then
echo -ne "\nInstall $NAME ? "
if choice 2>/dev/null; then
echo -ne "\n$APT_INST $NAME\n"
$APT_INST $NAME
else
echo -ne "\n\nAbort install script, package $NAME is required for work $PKG_NAME.\n"
exit 1;
fi
fi
done
}
#### Main
check_root
check_deps_pkg
echo -ne "\nYou want to install dbeaver-ce ($PKG_NAME)? "
if choice 2>/dev/null; then
echo -ne "\nAdd repository for dbeaver-ce\n"
$APT_INST apt-transport-https wget
wget -O /etc/apt/keyrings/dbeaver.asc https://dbeaver.io/debs/dbeaver.gpg.key
echo "deb [signed-by=/etc/apt/keyrings/dbeaver.asc] https://dbeaver.io/debs/dbeaver-ce /" | tee /etc/apt/sources.list.d/dbeaver.list
echo -e "\nUpdate apt"
$APT_UPDATE
echo -ne "\n$APT_INST $PKG_NAME\n"
$APT_INST $PKG_NAME
fi

View File

@@ -0,0 +1,56 @@
#!/bin/bash
#### Variables
APT_INST="apt -y install"
DST_INST="/usr/local/share"
DST_BIN="/usr/local/bin/postman"
PKG_DEPS=(wget)
URL_SRC="https://dl.pstmn.io/download/latest/linux_64"
#### Functions
check_root() {
if [ "$EUID" -ne 0 ]; then
echo "Must be root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true
do
read -rN1 input
case $input in
[yY][eE][sS]|[yY])
return 0
break
;;
[nN][oO]|[nN])
return 1
;;
esac
done
}
postman_install() {
echo "* download postman"
wget --quiet --show-progress "$URL_SRC" -O /tmp/postman-linux-x64.tar.gz
echo "* extract postman to $DST_INST"
tar -xf /tmp/postman-linux-x64.tar.gz -C "$DST_INST"
ln -f -s "$DST_INST/Postman/Postman" "$DST_BIN"
cp postman.desktop /usr/share/applications
echo "* cleanup ..."
rm -f /tmp/postman-linux-x64.tar.gz
echo "* installation of postman completed"
}
#### Main
check_root
postman_install

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman $U
Comment=REST API Client
Terminal=false
Icon=/usr/local/share/Postman/app/icons/icon_128x128.png
Type=Application
Categories=Development;

View File

@@ -0,0 +1,55 @@
#!/bin/bash
#### Variables
APT_UPDATE="apt -y update"
APT_INST="apt -y install"
APT_PURGE="apt -y purge"
APT_REMOVE="apt -y autoremove"
PKG_NAME="codium"
#### Functions
check_root() {
if [ "$EUID" -ne 0 ]; then
echo "Must be root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true
do
read -rN1 input
case $input in
[yY][eE][sS]|[yY])
return 0
break
;;
[nN][oO]|[nN])
return 1
;;
esac
done
}
#### Main
check_root
echo -e "\nUpdate apt"
echo "$APT_UPDATE"
$APT_UPDATE
echo -ne "\nYou want to install vscodium ($PKG_NAME)? "
if choice 2>/dev/null; then
echo -ne "\nAdd repository for vscodium\n"
$APT_INST apt-transport-https wget
wget -O /etc/apt/keyrings/vscodium-archive-keyring.asc https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg
echo 'deb [ signed-by=/etc/apt/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' | tee /etc/apt/sources.list.d/vscodium.list
$APT_UPDATE
echo -ne "\n$APT_INST $PKG_NAME\n"
$APT_INST $PKG_NAME
fi