shfmt
This commit is contained in:
parent
aed4e4b334
commit
146def9fbc
@ -36,4 +36,3 @@ package() {
|
||||
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,14 +1,13 @@
|
||||
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
|
||||
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 "$line1_to_add" >>"$file_path"
|
||||
echo "Alias hlna добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna уже есть в файле $file_path"
|
||||
@ -16,7 +15,7 @@ do
|
||||
|
||||
grep -qF "$line2_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line2_to_add" >> "$file_path"
|
||||
echo "$line2_to_add" >>"$file_path"
|
||||
echo "Alias hlna-bot добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot уже есть в файле $file_path"
|
||||
|
@ -1,9 +1,8 @@
|
||||
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
|
||||
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"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
name='hlna-git'
|
||||
version='latest'
|
||||
release='1'
|
||||
@ -36,4 +35,3 @@ package() {
|
||||
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,14 +1,13 @@
|
||||
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
|
||||
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 "$line1_to_add" >>"$file_path"
|
||||
echo "Alias hlna добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna уже есть в файле $file_path"
|
||||
@ -16,7 +15,7 @@ do
|
||||
|
||||
grep -qF "$line2_to_add" "$file_path"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$line2_to_add" >> "$file_path"
|
||||
echo "$line2_to_add" >>"$file_path"
|
||||
echo "Alias hlna-bot добавлен в $file_path"
|
||||
else
|
||||
echo "Alias hlna-bot уже есть в файле $file_path"
|
||||
|
@ -1,9 +1,8 @@
|
||||
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
|
||||
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"
|
||||
|
@ -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() {
|
||||
|
@ -4,8 +4,7 @@
|
||||
|
||||
# create a fake Steam installation to avoid
|
||||
# that steamcmd uses "/home/$user/Steam" instead
|
||||
if [ ! -e ~/.steam ]
|
||||
then
|
||||
if [ ! -e ~/.steam ]; then
|
||||
mkdir -p ~/.steam/appcache/
|
||||
mkdir -p ~/.steam/config/
|
||||
mkdir -p ~/.steam/logs/
|
||||
@ -14,8 +13,7 @@ then
|
||||
ln -s ~/.steam ~/.steam/steam
|
||||
fi
|
||||
|
||||
if [ ! -e ~/.steam/steamcmd ]
|
||||
then
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user