Fixed installations and xargs args.

This commit is contained in:
2024-05-30 23:24:55 +08:00
parent c20053df10
commit 3d63f9c254
3 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,6 @@
FROM debian:bookworm-slim
RUN apt update && apt upgrade -y && apt install rsync parallel jq
COPY . /app
WORKDIR /app
CMD bash /app/file-o-bot.sh
RUN bash ./install.sh
CMD bash /app/file-o-bot

View File

@ -71,7 +71,7 @@ fi
# Compile storage paths from all the movements
readarray -t STORAGE_PATHS \
< <( jq -r '.movements[] | .sourcePath, .destinationPath' "${MOVEMENT_JSON_PATH}" | xargs -n 1 -I {} readlink -e "{}" | sort --unique )
< <( jq -r '.movements[] | .sourcePath, .destinationPath' "${MOVEMENT_JSON_PATH}" | xargs -I {} readlink -e "{}" | sort --unique )
STORAGE_PATHS_LEN=${#STORAGE_PATHS[@]}
# Verify that all storage paths work

View File

@ -5,11 +5,11 @@ set -euo
. /etc/os-release
if [[ $ID == "debian" ]]; then
apt-get install -y rsync jq parallel
apt update && apt-get install -y rsync jq parallel
#elif [[ $ID == "centos" ]]; then
# yum -y install jq rsync parallel
elif [[ $ID_LIKE == "arch" ]]; then
pacman -S parallel jq rsync
pacman -Syyu && pacman -S parallel jq rsync
else
printf "Distro not found. Exiting."
exit 1