[neon/infrastructure/pangea-gemstash] /: add some failsafes
Carlos De Maine
null at kde.org
Tue May 30 04:27:06 BST 2023
Git commit c7a1df7224a7d0154134aca9fa4d50fe0c452fd9 by Carlos De Maine.
Committed on 30/05/2023 at 03:26.
Pushed by carlosdem into branch 'master'.
add some failsafes
M +7 -2 start.sh
https://invent.kde.org/neon/infrastructure/pangea-gemstash/-/commit/c7a1df7224a7d0154134aca9fa4d50fe0c452fd9
diff --git a/start.sh b/start.sh
index 510613b..8b40983 100755
--- a/start.sh
+++ b/start.sh
@@ -41,12 +41,17 @@ gem install bundler --conservative
gem update bundler
#install the config before we gemstash
+if [ -f /home/gemstash/.gemstash/config.yaml ]; then
+ rm -vf /home/gemstash/.gemstash/config.yaml
+fi
if [ -d "/home/gemstash/.gemstash/" ]
then
echo "~/.gemstash/ exists"
- rm -vf /home/gemstash/.gemstash/config.yaml
cp -vf config.yaml /home/gemstash/.gemstash/config.yaml
- mv -v /home/gemstash/.gemstash/gemstash.log /home/gemstash/.gemstash/gemstash.log.$(timestamp)
+ if [ -f /home/gemstash/.gemstash/gemstash.log ]; then
+ mv -v /home/gemstash/.gemstash/gemstash.log /home/gemstash/.gemstash/gemstash.log.$(timestamp)
+ echo "existing gemstash log, backing it up."
+ fi
else
echo "~/.gemstash/ doesn't exist, lets start from the beginning"
mkdir -v /home/gemstash/.gemstash/
More information about the Neon-commits
mailing list