From 159bddddbb7105f476d0fc226b595c4c26711d44 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 19 Feb 2018 10:18:32 +0100 Subject: [PATCH] Only try to move old script if it actually exists. This would otherwise just error out on first installation! --- home/bin/update-profile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/bin/update-profile b/home/bin/update-profile index bc7faa5..5b9f703 100755 --- a/home/bin/update-profile +++ b/home/bin/update-profile @@ -61,7 +61,9 @@ fi echo "Running profile installation..." cd .. - mv "${HOME}/bin/update-profile" "${HOME}/bin/update-profile.old" + if [ -f "${HOME}/bin/update-profile" ]; then + mv "${HOME}/bin/update-profile" "${HOME}/bin/update-profile.old" + fi ./install.sh )