This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
bash-shell-host/all/modules/install/rclone-install.func

30 lines
974 B
Plaintext
Raw Normal View History

2021-09-05 08:24:53 -07:00
sudo rclone.bin
chmod 775 rclone.bin
touch $INSTALL_DIR/rclone
touch $INSTALL_DIR/rclone.conf
mkdir $INSTALL_DIR/cache 2> /dev/null || true
echo '#!/bin/bash' > $INSTALL_DIR/rclone
CMD=$(echo $INSTALL_DIR/rclone.bin \
--config=$INSTALL_DIR/rclone.conf \
--cache-dir=$INSTALL_DIR/cache \
'$@' \
2021-01-18 15:33:14 -08:00
)
2021-09-05 08:24:53 -07:00
echo "$CMD" >> $INSTALL_DIR/rclone
chown :sudo rclone
chmod 775 rclone
rm $BIN_DIR/rclone
ln -s $INSTALL_DIR/rclone $BIN_DIR/rclone
echo -e "rclone customized command can be launched from $(command -v rclone) \n $CMD"
echo -e "uncustomized rclone can be run from $INSTALL_DIR/rclone.bin"
cd ..
#update version variable post install
version=`rclone --version 2>>errors | head -n 1`
printf "\n${last_version} has successfully installed."
printf '\nNow run "rclone config" to set up remotes. Check https://rclone.org/docs/ for more details.\n\n'
return 0
2021-01-18 15:33:14 -08:00
}