From 0950a4ee84fceb7395e0db60d14a68f36ef00ab7 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Tue, 18 Jun 2019 11:45:15 +0200 Subject: [PATCH] Prevent wamser self update to modify zshrc --- bin/update | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/update b/bin/update index 4e72c21..58a92b9 100755 --- a/bin/update +++ b/bin/update @@ -242,7 +242,14 @@ update-wasm() { echo -e "\033[32;1m=== Updating wasmer ===\033[0m" local start=`date +%s` + local old_path=$PWD + + cd ~/.config/dotfiles + git stash > /dev/null 2>&1 wasmer self-update + git checkout zshrc > /dev/null 2>&1 + git stash pop > /dev/null 2>&1 + cd $old_path local seconds=$((`date +%s` - $start)) local formatted=`date -ud "@$seconds" +'%H hours %M minutes %S seconds'`