No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

create_multisite.sh 394B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. usage() {
  3. echo -e "Usage : $0 LODELSITES_NAME [install_path] [install_tpl]"
  4. exit 1
  5. }
  6. if [ $# -lt 1 ]
  7. then
  8. usage
  9. fi
  10. name="$1"
  11. install_dir="$2"
  12. install_dir=${vardir:=[@]LODEL2_VARDIR[@]}
  13. install_tpl="$3"
  14. if echo $name | grep -Ev '^[a-z0-9_-]+$' &>/dev/null
  15. then
  16. echo "Only alnum lowercase '-', '_' allowed in name"
  17. usage
  18. fi
  19. echo cp -R $install_tpl "${install_dir}/$name"