Created
November 25, 2012 18:56
-
-
Save wandernauta/4144797 to your computer and use it in GitHub Desktop.
llamize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# llamize | |
# Stub a llama-standard ooc library/binding. | |
# | |
# Check if a name is given. | |
if [[ -z $1 ]]; then | |
echo "Usage: llamize <name>" | |
exit | |
fi | |
# Check if the destination already exist. Bail if it does. | |
if [[ -e $1 ]]; then | |
echo "Error: $1 already exists." | |
exit | |
fi | |
# Find out the name of the project from the destination path. | |
n=$(basename $1) | |
# All is good, create directories and file stubs | |
mkdir "$1" | |
mkdir "$1/samples" | |
mkdir "$1/source" | |
mkdir "$1/source/$n" | |
touch "$1/$n.use" | |
touch "$1/README.md" | |
touch "$1/.gitignore" | |
touch "$1/.travis.yml" | |
# Fill templates | |
echo "## $n | |
### Authors | |
* Your Name Here | |
### Links | |
* | |
" > "$1/README.md" | |
echo "Name: $n | |
Version: 0.1 | |
Description: | |
Pkgs: | |
Includes: | |
SourcePath: source | |
" > "$1/$n.use" | |
echo ".libs | |
rock_tmp | |
" > "$1/.gitignore" | |
echo "before_install: | |
- sudo aptitude -y -q install curl make libgc-dev | |
- git clone --depth=1 git://github.com/nddrylliog/rock.git | |
- (cd rock && make -s quick-rescue) | |
- export PATH=\$PATH:\$PWD/rock/bin | |
script: | |
- export OOC_LIBS=\$PWD | |
- cd samples | |
# - mkdir -p travis | |
# - rock -v example -o=travis/example && travis/example | |
" > "$1/.travis.yml" | |
echo "Done stubbing project $n." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just used it for https://github.com/nddrylliog/ooc-chipmunk - works great!