mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 04:00:17 +08:00
6531126eb2
Signed-off-by: Anagh Kumar Baranwal <anaghk.dos@gmail.com>
24 lines
665 B
Bash
Executable File
24 lines
665 B
Bash
Executable File
#!/bin/bash
|
|
# Insert the rc docs into docs/content/rc.md
|
|
|
|
set -e
|
|
|
|
go install
|
|
mkdir -p /tmp/rclone/cache_test
|
|
mkdir -p /tmp/rclone/rc_mount
|
|
export RCLONE_CONFIG_RCDOCS_TYPE=cache
|
|
export RCLONE_CONFIG_RCDOCS_REMOTE=/tmp/rclone/cache_test
|
|
rclone -q --rc mount rcdocs: /tmp/rclone/rc_mount &
|
|
sleep 0.5
|
|
rclone rc > /tmp/rclone/z.md
|
|
fusermount -u -z /tmp/rclone/rc_mount > /dev/null 2>&1 || umount /tmp/rclone/rc_mount
|
|
|
|
awk '
|
|
BEGIN {p=1}
|
|
/^<!--- autogenerated start/ {print;system("cat /tmp/rclone/z.md");p=0}
|
|
/^<!--- autogenerated stop/ {p=1}
|
|
p' docs/content/rc.md > /tmp/rclone/rc.md
|
|
|
|
mv /tmp/rclone/rc.md docs/content/rc.md
|
|
rm -rf /tmp/rclone
|