aboutsummaryrefslogtreecommitdiff
path: root/bin/mount_dev
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mount_dev')
-rwxr-xr-xbin/mount_dev9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/mount_dev b/bin/mount_dev
index 5255a18..cba8c82 100755
--- a/bin/mount_dev
+++ b/bin/mount_dev
@@ -31,7 +31,7 @@ if [ "$(ls -A $DIR)" ]; then
exit 1
fi
-sshfs "$1":"$DIR" "$DIR"
+sshfs -C -o cache_timeout=80000,auto_cache,reconnect "$1":"$DIR" "$DIR"
if [ ! -f "/media/$2" ]; then
sudo mkdir -p /media/$2
@@ -45,6 +45,13 @@ else
sudo mount --bind --verbose "$DIR" "/media/$2"
fi
+tput setaf 4
+echo "Caching files"
+tput sgr0
+for file in $(find "$DIR"); do
+ cat $file > /dev/null 2>&1
+done
+
tput setaf 2
echo "Done"
tput sgr0