-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd-copyright-headers.sh
More file actions
executable file
·45 lines (38 loc) · 1.05 KB
/
add-copyright-headers.sh
File metadata and controls
executable file
·45 lines (38 loc) · 1.05 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
#!/bin/bash
# Add copyright to .cs files
for file in ProjectTemplates/*.cs; do
if [ -f "$file" ]; then
temp_file=$(mktemp)
cat > "$temp_file" << 'HEADER'
/*
* Copyright (c) 2025 Barrer Software
*
* This file is part of the AMP Visual Studio Plugin.
* Licensed under the MIT License - see LICENSE.txt
*
* For more information: https://barrersoftware.com
*/
HEADER
cat "$file" >> "$temp_file"
mv "$temp_file" "$file"
echo "Added header to $file"
fi
done
# Add copyright to HTML files
for file in ProjectTemplates/WebRoot/*.html; do
if [ -f "$file" ]; then
temp_file=$(mktemp)
cat > "$temp_file" << 'HEADER'
<!--
Copyright (c) 2025 Barrer Software
This file is part of the AMP Visual Studio Plugin.
Licensed under the MIT License - see LICENSE.txt
For more information: https://barrersoftware.com
-->
HEADER
cat "$file" >> "$temp_file"
mv "$temp_file" "$file"
echo "Added header to $file"
fi
done
echo "✅ Copyright headers added to all source files"