📄 lgpl_header_gen.sh
字号:
#!/bin/bashif [ "$1" = "" -o "$2" = "" -o "$3" = "" ]; then echo Generate LGPL Free Software Header echo Usage: $0 \"Copyright holder\" EMail-Address Filename exit 1fifilename=`basename $3`export "LANG=C"echo "/***************************************************************************" > $3.tmp.headerecho -e " tag: $1 " `date` " $filename \n" >> $3.tmp.headerecho " $filename - description" >> $3.tmp.headerecho " -------------------" >> $3.tmp.headerecho " begin : "`date "+%a %B %d %Y"` >> $3.tmp.headerecho " copyright : (C) "`date +%Y` $1 >> $3.tmp.header#echo " copyright : (C) "`date +%Y` `cat /etc/passwd | ( IFS=: ; while read lognam pw id gp fname home sh; do echo $home \"$fname\"; done ) | /bin/grep "/home/$USER" | sed "s/\/home\/$USER\ \"//" | sed "s/,,,\"//"` >> $3.tmp.headerecho " email : "$2 >> $3.tmp.headerecho " " >> $3.tmp.headerecho " ***************************************************************************" >> $3.tmp.headerecho " * This library is free software; you can redistribute it and/or *" >> $3.tmp.headerecho " * modify it under the terms of the GNU Lesser General Public *" >> $3.tmp.headerecho " * License as published by the Free Software Foundation; either *" >> $3.tmp.headerecho " * version 2.1 of the License, or (at your option) any later version. *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " * This library is distributed in the hope that it will be useful, *" >> $3.tmp.headerecho " * but WITHOUT ANY WARRANTY; without even the implied warranty of *" >> $3.tmp.headerecho " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *" >> $3.tmp.headerecho " * Lesser General Public License for more details. *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " * You should have received a copy of the GNU Lesser General Public *" >> $3.tmp.headerecho " * License along with this library; if not, write to the Free Software *" >> $3.tmp.headerecho " * Foundation, Inc., 59 Temple Place, *" >> $3.tmp.headerecho " * Suite 330, Boston, MA 02111-1307 USA *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " ***************************************************************************/" >> $3.tmp.headerecho " " >> $3.tmp.headerecho " " >> $3.tmp.headercat $3.tmp.header $3 > $3.tmp.fullmv $3.tmp.full $3rm $3.tmp.header#!/bin/bashif [ "$1" = "" -o "$2" = "" -o "$3" = "" ]; then echo Generate LGPL Free Software Header echo Usage: $0 \"Copyright holder\" EMail-Address Filename exit 1fifilename=`basename $3`export "LANG=C"echo "/***************************************************************************" > $3.tmp.headerecho -e " tag: $1 " `date` " $filename \n" >> $3.tmp.headerecho " $filename - description" >> $3.tmp.headerecho " -------------------" >> $3.tmp.headerecho " begin : "`date "+%a %B %d %Y"` >> $3.tmp.headerecho " copyright : (C) "`date +%Y` $1 >> $3.tmp.header#echo " copyright : (C) "`date +%Y` `cat /etc/passwd | ( IFS=: ; while read lognam pw id gp fname home sh; do echo $home \"$fname\"; done ) | /bin/grep "/home/$USER" | sed "s/\/home\/$USER\ \"//" | sed "s/,,,\"//"` >> $3.tmp.headerecho " email : "$2 >> $3.tmp.headerecho " " >> $3.tmp.headerecho " ***************************************************************************" >> $3.tmp.headerecho " * This library is free software; you can redistribute it and/or *" >> $3.tmp.headerecho " * modify it under the terms of the GNU Lesser General Public *" >> $3.tmp.headerecho " * License as published by the Free Software Foundation; either *" >> $3.tmp.headerecho " * version 2.1 of the License, or (at your option) any later version. *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " * This library is distributed in the hope that it will be useful, *" >> $3.tmp.headerecho " * but WITHOUT ANY WARRANTY; without even the implied warranty of *" >> $3.tmp.headerecho " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *" >> $3.tmp.headerecho " * Lesser General Public License for more details. *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " * You should have received a copy of the GNU Lesser General Public *" >> $3.tmp.headerecho " * License along with this library; if not, write to the Free Software *" >> $3.tmp.headerecho " * Foundation, Inc., 59 Temple Place, *" >> $3.tmp.headerecho " * Suite 330, Boston, MA 02111-1307 USA *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " ***************************************************************************/" >> $3.tmp.headerecho " " >> $3.tmp.headerecho " " >> $3.tmp.headercat $3.tmp.header $3 > $3.tmp.fullmv $3.tmp.full $3rm $3.tmp.header#!/bin/bashif [ "$1" = "" -o "$2" = "" -o "$3" = "" ]; then echo Generate LGPL Free Software Header echo Usage: $0 \"Copyright holder\" EMail-Address Filename exit 1fifilename=`basename $3`echo "/***************************************************************************" > $3.tmp.headerecho -e " tag: $1 " `date` " $filename \n" >> $3.tmp.headerecho " $filename - description" >> $3.tmp.headerecho " -------------------" >> $3.tmp.headerecho " begin : "`date "+%a %B %d %Y"` >> $3.tmp.headerecho " copyright : (C) "`date +%Y` $1 >> $3.tmp.header#echo " copyright : (C) "`date +%Y` `cat /etc/passwd | ( IFS=: ; while read lognam pw id gp fname home sh; do echo $home \"$fname\"; done ) | /bin/grep "/home/$USER" | sed "s/\/home\/$USER\ \"//" | sed "s/,,,\"//"` >> $3.tmp.headerecho " email : "$2 >> $3.tmp.headerecho " " >> $3.tmp.headerecho " ***************************************************************************" >> $3.tmp.headerecho " * This library is free software; you can redistribute it and/or *" >> $3.tmp.headerecho " * modify it under the terms of the GNU Lesser General Public *" >> $3.tmp.headerecho " * License as published by the Free Software Foundation; either *" >> $3.tmp.headerecho " * version 2.1 of the License, or (at your option) any later version. *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " * This library is distributed in the hope that it will be useful, *" >> $3.tmp.headerecho " * but WITHOUT ANY WARRANTY; without even the implied warranty of *" >> $3.tmp.headerecho " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *" >> $3.tmp.headerecho " * Lesser General Public License for more details. *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " * You should have received a copy of the GNU Lesser General Public *" >> $3.tmp.headerecho " * License along with this library; if not, write to the Free Software *" >> $3.tmp.headerecho " * Foundation, Inc., 59 Temple Place, *" >> $3.tmp.headerecho " * Suite 330, Boston, MA 02111-1307 USA *" >> $3.tmp.headerecho " * *" >> $3.tmp.headerecho " ***************************************************************************/" >> $3.tmp.headerecho " " >> $3.tmp.headerecho " " >> $3.tmp.headercat $3.tmp.header $3 > $3.tmp.fullmv $3.tmp.full $3rm $3.tmp.header
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -