shfmt
This commit is contained in:
parent
aed4e4b334
commit
146def9fbc
@ -21,19 +21,18 @@ version() {
|
||||
}
|
||||
|
||||
scripts=(
|
||||
['postinstall']='postinstall.sh'
|
||||
['postremove']='postremove.sh'
|
||||
['postinstall']='postinstall.sh'
|
||||
['postremove']='postremove.sh'
|
||||
)
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/hln-a"
|
||||
pip3 install --upgrade --user click colorama click_completion pyTelegramBotAPI discord
|
||||
pip3 install --upgrade rcon
|
||||
cd "$srcdir/hln-a"
|
||||
pip3 install --upgrade --user click colorama click_completion pyTelegramBotAPI discord
|
||||
pip3 install --upgrade rcon
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 "${srcdir}/hln-a/hlna.py" "${pkgdir}/usr/bin/hlna.py"
|
||||
install -Dm755 "${srcdir}/hln-a/hlna_bot.py" "${pkgdir}/usr/bin/hlna-bot.py"
|
||||
install -Dm755 "${srcdir}/hln-a/hlna_bot.py" "${pkgdir}/usr/bin/hlna-bot.py"
|
||||
install -Dm644 "${srcdir}/hln-a/LICENSE.md" "${pkgdir}/usr/share/licenses/hlna/license"
|
||||
}
|
||||
|
||||
|
@ -1,28 +1,27 @@
|
||||
line1_to_add='alias hlna="hlna.py"'
|
||||
line2_to_add='alias hlna-bot="hlna-bot.py"'
|
||||
file_paths=( "/home/$SUDO_USER/.zshrc" "/home/$SUDO_USER/.bashrc" "/home/$SUDO_USER/.config/fish/config.fish" )
|
||||
file_paths=("/home/$SUDO_USER/.zshrc" "/home/$SUDO_USER/.bashrc" "/home/$SUDO_USER/.config/fish/config.fish")
|
||||
|
||||
for file_path in "${file_paths[@]}"
|
||||
do
|
||||
if [ -f "$file_path" ]; then
|
||||
# Check if the lines are already in the file
|
||||
grep -qF "$line1_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line1_to_add" >> "$file_path"
|
||||
echo "Alias hlna добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna уже есть в файле $file_path"
|
||||
fi
|
||||
for file_path in "${file_paths[@]}"; do
|
||||
if [ -f "$file_path" ]; then
|
||||
# Check if the lines are already in the file
|
||||
grep -qF "$line1_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line1_to_add" >>"$file_path"
|
||||
echo "Alias hlna добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna уже есть в файле $file_path"
|
||||
fi
|
||||
|
||||
grep -qF "$line2_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line2_to_add" >> "$file_path"
|
||||
echo "Alias hlna-bot добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot уже есть в файле $file_path"
|
||||
fi
|
||||
grep -qF "$line2_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line2_to_add" >>"$file_path"
|
||||
echo "Alias hlna-bot добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot уже есть в файле $file_path"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "$file_path не существует"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "$file_path не существует"
|
||||
fi
|
||||
done
|
||||
|
@ -1,27 +1,26 @@
|
||||
line1_to_remove='alias hlna="hlna.py"'
|
||||
line2_to_remove='alias hlna-bot="hlna-bot.py"'
|
||||
file_paths=( "/home/$SUDO_USER/.zshrc" "/home/$SUDO_USER/.bashrc" "/home/$SUDO_USER/.config/fish/config.fish" )
|
||||
file_paths=("/home/$SUDO_USER/.zshrc" "/home/$SUDO_USER/.bashrc" "/home/$SUDO_USER/.config/fish/config.fish")
|
||||
|
||||
for file_path in "${file_paths[@]}"
|
||||
do
|
||||
if [ -f "$file_path" ]; then
|
||||
# Check if the line is in the file
|
||||
grep -qF "$line1_to_remove" "$file_path"
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "/$line1_to_remove/d" "$file_path"
|
||||
echo "Alias hlna удалён из $file_path"
|
||||
else
|
||||
echo "Alias hlna нет в $file_path"
|
||||
fi
|
||||
for file_path in "${file_paths[@]}"; do
|
||||
if [ -f "$file_path" ]; then
|
||||
# Check if the line is in the file
|
||||
grep -qF "$line1_to_remove" "$file_path"
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "/$line1_to_remove/d" "$file_path"
|
||||
echo "Alias hlna удалён из $file_path"
|
||||
else
|
||||
echo "Alias hlna нет в $file_path"
|
||||
fi
|
||||
|
||||
grep -qF "$line2_to_remove" "$file_path"
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "/$line2_to_remove/d" "$file_path"
|
||||
echo "Alias hlna-bot удалён из $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot нет в $file_path"
|
||||
fi
|
||||
else
|
||||
echo "$file_path не существует"
|
||||
fi
|
||||
done
|
||||
grep -qF "$line2_to_remove" "$file_path"
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "/$line2_to_remove/d" "$file_path"
|
||||
echo "Alias hlna-bot удалён из $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot нет в $file_path"
|
||||
fi
|
||||
else
|
||||
echo "$file_path не существует"
|
||||
fi
|
||||
done
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
name='hlna-git'
|
||||
version='latest'
|
||||
release='1'
|
||||
@ -22,18 +21,17 @@ version() {
|
||||
}
|
||||
|
||||
scripts=(
|
||||
['postinstall']='postinstall.sh'
|
||||
['postremove']='postremove.sh'
|
||||
['postinstall']='postinstall.sh'
|
||||
['postremove']='postremove.sh'
|
||||
)
|
||||
|
||||
prepare() {
|
||||
pip3 install --upgrade --user click colorama click_completion pyTelegramBotAPI discord
|
||||
pip3 install --upgrade rcon
|
||||
pip3 install --upgrade --user click colorama click_completion pyTelegramBotAPI discord
|
||||
pip3 install --upgrade rcon
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 "${srcdir}/hln-a/hlna.py" "${pkgdir}/usr/bin/hlna.py"
|
||||
install -Dm755 "${srcdir}/hln-a/hlna_bot.py" "${pkgdir}/usr/bin/hlna-bot.py"
|
||||
install -Dm755 "${srcdir}/hln-a/hlna_bot.py" "${pkgdir}/usr/bin/hlna-bot.py"
|
||||
install -Dm644 "${srcdir}/hln-a/LICENSE.md" "${pkgdir}/usr/share/licenses/hlna/license"
|
||||
}
|
||||
|
||||
|
@ -1,28 +1,27 @@
|
||||
line1_to_add='alias hlna="hlna.py"'
|
||||
line2_to_add='alias hlna-bot="hlna-bot.py"'
|
||||
file_paths=( "/home/$SUDO_USER/.zshrc" "/home/$SUDO_USER/.bashrc" "/home/$SUDO_USER/.config/fish/config.fish" )
|
||||
file_paths=("/home/$SUDO_USER/.zshrc" "/home/$SUDO_USER/.bashrc" "/home/$SUDO_USER/.config/fish/config.fish")
|
||||
|
||||
for file_path in "${file_paths[@]}"
|
||||
do
|
||||
if [ -f "$file_path" ]; then
|
||||
# Check if the lines are already in the file
|
||||
grep -qF "$line1_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line1_to_add" >> "$file_path"
|
||||
echo "Alias hlna добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna уже есть в файле $file_path"
|
||||
fi
|
||||
for file_path in "${file_paths[@]}"; do
|
||||
if [ -f "$file_path" ]; then
|
||||
# Check if the lines are already in the file
|
||||
grep -qF "$line1_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line1_to_add" >>"$file_path"
|
||||
echo "Alias hlna добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna уже есть в файле $file_path"
|
||||
fi
|
||||
|
||||
grep -qF "$line2_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line2_to_add" >> "$file_path"
|
||||
echo "Alias hlna-bot добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot уже есть в файле $file_path"
|
||||
fi
|
||||
grep -qF "$line2_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line2_to_add" >>"$file_path"
|
||||
echo "Alias hlna-bot добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot уже есть в файле $file_path"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "$file_path не существует"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "$file_path не существует"
|
||||
fi
|
||||
done
|
||||
|
@ -1,27 +1,26 @@
|
||||
line1_to_remove='alias hlna="hlna.py"'
|
||||
line2_to_remove='alias hlna-bot="hlna-bot.py"'
|
||||
file_paths=( "/home/$SUDO_USER/.zshrc" "/home/$SUDO_USER/.bashrc" "/home/$SUDO_USER/.config/fish/config.fish" )
|
||||
file_paths=("/home/$SUDO_USER/.zshrc" "/home/$SUDO_USER/.bashrc" "/home/$SUDO_USER/.config/fish/config.fish")
|
||||
|
||||
for file_path in "${file_paths[@]}"
|
||||
do
|
||||
if [ -f "$file_path" ]; then
|
||||
# Check if the line is in the file
|
||||
grep -qF "$line1_to_remove" "$file_path"
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "/$line1_to_remove/d" "$file_path"
|
||||
echo "Alias hlna удалён из $file_path"
|
||||
else
|
||||
echo "Alias hlna нет в $file_path"
|
||||
fi
|
||||
for file_path in "${file_paths[@]}"; do
|
||||
if [ -f "$file_path" ]; then
|
||||
# Check if the line is in the file
|
||||
grep -qF "$line1_to_remove" "$file_path"
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "/$line1_to_remove/d" "$file_path"
|
||||
echo "Alias hlna удалён из $file_path"
|
||||
else
|
||||
echo "Alias hlna нет в $file_path"
|
||||
fi
|
||||
|
||||
grep -qF "$line2_to_remove" "$file_path"
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "/$line2_to_remove/d" "$file_path"
|
||||
echo "Alias hlna-bot удалён из $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot нет в $file_path"
|
||||
fi
|
||||
else
|
||||
echo "$file_path не существует"
|
||||
fi
|
||||
done
|
||||
grep -qF "$line2_to_remove" "$file_path"
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i "/$line2_to_remove/d" "$file_path"
|
||||
echo "Alias hlna-bot удалён из $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot нет в $file_path"
|
||||
fi
|
||||
else
|
||||
echo "$file_path не существует"
|
||||
fi
|
||||
done
|
||||
|
@ -13,11 +13,11 @@ sources=("https://github.com/logseq/logseq/releases/download/${version}/logseq-l
|
||||
checksums=('SKIP')
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/Logseq-linux-x64"
|
||||
install -Dm644 "${scriptdir}/logseq-desktop.desktop" "${pkgdir}/usr/share/applications/logseq-desktop.desktop"
|
||||
install -Dm644 "${srcdir}/Logseq-linux-x64/resources/app/icons/logseq.png" "${pkgdir}/usr/share/pixmaps/logseq.png"
|
||||
install -d ${pkgdir}/opt/logseq
|
||||
cp -r "${srcdir}/Logseq-linux-x64" "${pkgdir}/opt/logseq"
|
||||
install -d "${pkgdir}/usr/bin"
|
||||
ln -s "/opt/logseq/Logseq-linux-x64/Logseq" "${pkgdir}/usr/bin/logseq"
|
||||
cd "${srcdir}/Logseq-linux-x64"
|
||||
install -Dm644 "${scriptdir}/logseq-desktop.desktop" "${pkgdir}/usr/share/applications/logseq-desktop.desktop"
|
||||
install -Dm644 "${srcdir}/Logseq-linux-x64/resources/app/icons/logseq.png" "${pkgdir}/usr/share/pixmaps/logseq.png"
|
||||
install -d ${pkgdir}/opt/logseq
|
||||
cp -r "${srcdir}/Logseq-linux-x64" "${pkgdir}/opt/logseq"
|
||||
install -d "${pkgdir}/usr/bin"
|
||||
ln -s "/opt/logseq/Logseq-linux-x64/Logseq" "${pkgdir}/usr/bin/logseq"
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ deps_amd64=('libgcc(x86-32)')
|
||||
deps_amd64_arch=('lib32-gcc-libs')
|
||||
deps_amd64_rosa=('lib64gcc1')
|
||||
|
||||
|
||||
sources=("https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz")
|
||||
sources=("https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz")
|
||||
checksums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
@ -23,8 +22,8 @@ prepare() {
|
||||
package() {
|
||||
install -Dm755 "${scriptdir}/steamcmd" "${pkgdir}/usr/bin/steamcmd"
|
||||
install -Dm755 "${srcdir}/steamcmd.sh" "${pkgdir}/usr/share/steamcmd/steamcmd.sh"
|
||||
install -Dm755 "${srcdir}/linux32/crashhandler.so" "${pkgdir}/usr/share/steamcmd/linux32/crashhandler.so"
|
||||
install -Dm755 "${srcdir}/linux32/libstdc++.so.6" "${pkgdir}/usr/share/steamcmd/linux32/libstdc++.so.6"
|
||||
install -Dm755 "${srcdir}/linux32/steamcmd" "${pkgdir}/usr/share/steamcmd/linux32/steamcmd"
|
||||
install -Dm755 "${srcdir}/linux32/steamerrorreporter" "${pkgdir}/usr/share/steamcmd/linux32/steamerrorreporter"
|
||||
install -Dm755 "${srcdir}/linux32/crashhandler.so" "${pkgdir}/usr/share/steamcmd/linux32/crashhandler.so"
|
||||
install -Dm755 "${srcdir}/linux32/libstdc++.so.6" "${pkgdir}/usr/share/steamcmd/linux32/libstdc++.so.6"
|
||||
install -Dm755 "${srcdir}/linux32/steamcmd" "${pkgdir}/usr/share/steamcmd/linux32/steamcmd"
|
||||
install -Dm755 "${srcdir}/linux32/steamerrorreporter" "${pkgdir}/usr/share/steamcmd/linux32/steamerrorreporter"
|
||||
}
|
||||
|
@ -4,21 +4,19 @@
|
||||
|
||||
# create a fake Steam installation to avoid
|
||||
# that steamcmd uses "/home/$user/Steam" instead
|
||||
if [ ! -e ~/.steam ]
|
||||
then
|
||||
mkdir -p ~/.steam/appcache/
|
||||
mkdir -p ~/.steam/config/
|
||||
mkdir -p ~/.steam/logs/
|
||||
mkdir -p ~/.steam/SteamApps/common/
|
||||
ln -s ~/.steam ~/.steam/root
|
||||
ln -s ~/.steam ~/.steam/steam
|
||||
if [ ! -e ~/.steam ]; then
|
||||
mkdir -p ~/.steam/appcache/
|
||||
mkdir -p ~/.steam/config/
|
||||
mkdir -p ~/.steam/logs/
|
||||
mkdir -p ~/.steam/SteamApps/common/
|
||||
ln -s ~/.steam ~/.steam/root
|
||||
ln -s ~/.steam ~/.steam/steam
|
||||
fi
|
||||
|
||||
if [ ! -e ~/.steam/steamcmd ]
|
||||
then
|
||||
mkdir -p ~/.steam/steamcmd/linux32
|
||||
# steamcmd will replace these files with newer ones itself on first run
|
||||
cp /usr/share/steamcmd/steamcmd.sh ~/.steam/steamcmd/steamcmd.sh
|
||||
cp /usr/share/steamcmd/linux32/steamcmd ~/.steam/steamcmd/linux32/steamcmd
|
||||
if [ ! -e ~/.steam/steamcmd ]; then
|
||||
mkdir -p ~/.steam/steamcmd/linux32
|
||||
# steamcmd will replace these files with newer ones itself on first run
|
||||
cp /usr/share/steamcmd/steamcmd.sh ~/.steam/steamcmd/steamcmd.sh
|
||||
cp /usr/share/steamcmd/linux32/steamcmd ~/.steam/steamcmd/linux32/steamcmd
|
||||
fi
|
||||
exec ~/.steam/steamcmd/steamcmd.sh $@
|
||||
exec ~/.steam/steamcmd/steamcmd.sh $@
|
||||
|
Loading…
Reference in New Issue
Block a user