aboutsummaryrefslogtreecommitdiffstats
path: root/modules/planet/templates
diff options
context:
space:
mode:
authorDamien Lallement <dams@mageia.org>2011-02-17 12:29:41 +0000
committerDamien Lallement <dams@mageia.org>2011-02-17 12:29:41 +0000
commita16160dd2ef4f6c90c8a08c4ddc5f10e2c5b9e0b (patch)
treee7748891ef15b2a4392e7a048f0d0e34235599e9 /modules/planet/templates
parent1060c0983fad8f73eec4afac76c002125992591b (diff)
downloadpuppet-a16160dd2ef4f6c90c8a08c4ddc5f10e2c5b9e0b.tar
puppet-a16160dd2ef4f6c90c8a08c4ddc5f10e2c5b9e0b.tar.gz
puppet-a16160dd2ef4f6c90c8a08c4ddc5f10e2c5b9e0b.tar.bz2
puppet-a16160dd2ef4f6c90c8a08c4ddc5f10e2c5b9e0b.tar.xz
puppet-a16160dd2ef4f6c90c8a08c4ddc5f10e2c5b9e0b.zip
start to deploy the deployment script
Diffstat (limited to 'modules/planet/templates')
-rwxr-xr-xmodules/planet/templates/deploy_new-planet.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/planet/templates/deploy_new-planet.sh b/modules/planet/templates/deploy_new-planet.sh
new file mode 100755
index 00000000..83bc88f5
--- /dev/null
+++ b/modules/planet/templates/deploy_new-planet.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Initialization
+PATH_TO_FILE=${PATH_TO_FILE:-/var/lib/planet}
+
+#Ask for new locale name if no parameter given
+echo -n "Locale name: "
+read locale
+
+# Display the answer and ask for confirmation
+echo -e -n "Do you confirm the entry: \"$locale\"? (y/n) "
+read answer
+if [ "$answer" == "y" ]
+then
+ FILE="$PATH_TO_FILE/$locale/"
+ if test -d $FILE
+ then
+ echo "Aborted, $FILE already exist."
+ exit 2
+ else
+ /bin/mkdir $FILE
+ fi
+else
+ echo "Aborted, please try again."
+ exit 2
+fi