diff --git a/hlna-dev-git/lure.sh b/hlna-dev-git/lure.sh index 4b22481..8d93869 100644 --- a/hlna-dev-git/lure.sh +++ b/hlna-dev-git/lure.sh @@ -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" } - diff --git a/hlna-dev-git/postinstall.sh b/hlna-dev-git/postinstall.sh index 6d46d01..260db4b 100644 --- a/hlna-dev-git/postinstall.sh +++ b/hlna-dev-git/postinstall.sh @@ -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 \ No newline at end of file + else + echo "$file_path не существует" + fi +done diff --git a/hlna-dev-git/postremove.sh b/hlna-dev-git/postremove.sh index ea8a779..f4bfb90 100644 --- a/hlna-dev-git/postremove.sh +++ b/hlna-dev-git/postremove.sh @@ -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 \ No newline at end of file + 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 diff --git a/hlna-git/lure.sh b/hlna-git/lure.sh index 682c095..95802c1 100644 --- a/hlna-git/lure.sh +++ b/hlna-git/lure.sh @@ -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" } - diff --git a/hlna-git/postinstall.sh b/hlna-git/postinstall.sh index 6d46d01..260db4b 100644 --- a/hlna-git/postinstall.sh +++ b/hlna-git/postinstall.sh @@ -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 \ No newline at end of file + else + echo "$file_path не существует" + fi +done diff --git a/hlna-git/postremove.sh b/hlna-git/postremove.sh index ea8a779..f4bfb90 100644 --- a/hlna-git/postremove.sh +++ b/hlna-git/postremove.sh @@ -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 \ No newline at end of file + 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 diff --git a/logseq-desktop/lure.sh b/logseq-desktop/lure.sh index 42aee68..6a33924 100644 --- a/logseq-desktop/lure.sh +++ b/logseq-desktop/lure.sh @@ -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" } diff --git a/steamcmd/lure.sh b/steamcmd/lure.sh index d7f3159..ea868e8 100644 --- a/steamcmd/lure.sh +++ b/steamcmd/lure.sh @@ -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" } diff --git a/steamcmd/steamcmd b/steamcmd/steamcmd index 0752fb1..c354121 100644 --- a/steamcmd/steamcmd +++ b/steamcmd/steamcmd @@ -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 $@ \ No newline at end of file +exec ~/.steam/steamcmd/steamcmd.sh $@