Sha256: 744d374f24b67e1380b20e1d368aa2899c4597f1ed28b2d08dc34c87247471c4
Contents?: true
Size: 881 Bytes
Versions: 33
Compression:
Stored size: 881 Bytes
Contents
#!/bin/bash if [ -z $1 ]; then echo "No exercise slug provided" exit 1 fi tolower() { local result=$(echo $1 | tr '[:upper:]' '[:lower:]') echo "$result" } exercise=$(tolower $1) if [ -n "$(find exercises -name $exercise -type d -maxdepth 1)" ]; then echo "Exercise '$exercise' already exists" exit 1 fi if [ -z "$(find bin -name configlet -type f)" ]; then bin/fetch-configlet fi if [ -z "$(find .. -name "problem-specifications" -type d -maxdepth 1)" ]; then git clone https://github.com/exercism/problem-specifications.git \ ../problem-specifications fi mkdir -p exercises/$exercise/tests bin/configlet generate . --only $exercise cp -r template/* exercises/$exercise echo "Done" echo "---" echo "Navigate to 'exercises/$exercise' to start working on '$exercise'" echo "See the 'Generating Setup' part of contributing to figure out the next steps"
Version data entries
33 entries across 33 versions & 1 rubygems