A CLI tool for downloading from pixiv.net
Revision | b5e95f65b77d301fa43cabb43366b90744419328 (tree) |
---|---|
Zeit | 2023-10-26 08:09:01 |
Autor | mio <stigma@disr...> |
Commiter | mio |
Generate entire 'git_version' file.
@@ -20,3 +20,4 @@ docs/ | ||
20 | 20 | # AppImage |
21 | 21 | *.AppImage |
22 | 22 | AppDir/ |
23 | +source/git_version.d |
@@ -4,10 +4,26 @@ if [ -d ".git" ] | ||
4 | 4 | then |
5 | 5 | which git >/dev/null || exit 0 |
6 | 6 | |
7 | - # Keep all but the last two lines | |
8 | - git_version_file="$(head -n -2 source/git_version.d)" | |
9 | - printf "%s\n\n" "$git_version_file" > source/git_version.d | |
7 | + cat <<-_END > source/git_version.d | |
8 | +/* | |
9 | + * pixiv_down - CLI-based downloading tool for https://www.pixiv.net. | |
10 | + * Copyright (C) 2023 Mio | |
11 | + * | |
12 | + * This program is free software: you can redistribute it and/or modify | |
13 | + * it under the terms of the GNU General Public License as published by | |
14 | + * the Free Software Foundation, version 3 of the License. | |
15 | + * | |
16 | + * This program is distributed in the hope that it will be useful, | |
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | + * GNU General Public License for more details. | |
20 | + * | |
21 | + * You should have received a copy of the GNU General Public License | |
22 | + * along with this program. If not, see <https://www.gnu.org/licenses/>. | |
23 | + */ | |
24 | +module git_version; | |
10 | 25 | |
26 | +_END | |
11 | 27 | |
12 | 28 | version="$(git show --pretty='%cd %h' --date=format:%Y-%m --no-patch --no-notes HEAD)" |
13 | 29 | gdate="$(printf '%s' "$version" | cut -d' ' -f1)" |
@@ -17,5 +33,3 @@ then | ||
17 | 33 | |
18 | 34 | printf "[prebuild_command] Successfully inserted git version.\n" |
19 | 35 | fi |
20 | - | |
21 | - |
@@ -1,20 +0,0 @@ | ||
1 | -/* | |
2 | - * pixiv_down - CLI-based downloading tool for https://www.pixiv.net. | |
3 | - * Copyright (C) 2023 Mio | |
4 | - * | |
5 | - * This program is free software: you can redistribute it and/or modify | |
6 | - * it under the terms of the GNU General Public License as published by | |
7 | - * the Free Software Foundation, version 3 of the License. | |
8 | - * | |
9 | - * This program is distributed in the hope that it will be useful, | |
10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | - * GNU General Public License for more details. | |
13 | - * | |
14 | - * You should have received a copy of the GNU General Public License | |
15 | - * along with this program. If not, see <https://www.gnu.org/licenses/>. | |
16 | - */ | |
17 | -module git_version; | |
18 | - | |
19 | -enum GitDate = "2023-09"; | |
20 | -enum GitHash = "081637a"; |