Fixed installations and xargs args.
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user