remaster/script/add_function.sh
2018-05-20 21:16:19 +02:00

13 lines
214 B
Bash
Executable File

#!/bin/bash
#check param
[ -z "$1" ] && { echo "$0 [name]"; exit 1; }
name="$1"
#gen function
cp "doc/lib-head+tail" "src/func/$name"
sed -i "s/<function>/$name/g" "src/func/$name"
#open
editor "src/func/$name"