forked from nexusformat/features
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewfeature
More file actions
executable file
·58 lines (42 loc) · 1.62 KB
/
newfeature
File metadata and controls
executable file
·58 lines (42 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#! /bin/sh -e
# check we are a clone or suggest to make us one - finding the toplevel sufficient for now
cd `git rev-parse --show-toplevel`
# pull from upstream
git pull git@github.com:nexusformat/features.git master || ( echo refresh from upstream git failed >&2 ; exit 1 )
# ask questions:
# email
printf "enter your email address: "
read EMAIL
# feature title
printf "enter a title/tag line for the proposed feature (< 80 chars): "
read TITLE
# request to webservice
# encode proposer & title
# check curl is there
ID=`curl -s --data "proposer=$EMAIL&title=$TITLE" https://idregistry-nexusformat.rhcloud.com/ids/ | python -c "import sys, json; print json.load(sys.stdin)['id']"`
cat << EOF
The ID assigned was $ID - congratulations!
EOF
# create template
DIR=src/recipes/$ID
mkdir -p $DIR
cd $DIR
touch __init__.py
sed -e s,@TITLE@,"$TITLE", -e s,@EMAIL@,"$EMAIL", < ../TEMPLATETEMPLATE/recipe.py > recipe.py
cat << EOF
If all went well and you should now be set.
The ID assigned was $ID.
This is a temporary assignment and needs to be confirmed by clicking
the link in the activation email you should have recevied or should
recevie soon.
The ID assignment may be withdrawn if not confirmed within a reasonable
timescale (on the order of months).
Some template code to get you started has been created in $DIR.
Please edit this code and submit a Github pull request against
https://github.com/nexusformat/features when done to get your
code included.
There is no firm time limit for submitting a pull request as
long as your confirmed email address is still reachable.
Have fun. Thank you for supporting NeXus.
EOF
exit 0