Add color replacement script
This commit is contained in:
16
servers/deployment/color_replace.sh
Normal file
16
servers/deployment/color_replace.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Check if both arguments are provided
|
||||||
|
if [ $# -ne 2 ]; then
|
||||||
|
echo "Usage: $0 <old_color> <new_color>"
|
||||||
|
echo "Example: $0 556ee6 2A9D8F"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
old_color=$1
|
||||||
|
new_color=$2
|
||||||
|
|
||||||
|
# Find all .html, .css, and .js files and replace the color
|
||||||
|
find . -type f \( -name "*.html" -o -name "*.css" -o -name "*.js" \) -print0 | xargs -0 sed -i "s/$old_color/$new_color/g"
|
||||||
|
|
||||||
|
echo "Color replacement complete: $old_color replaced with $new_color"
|
||||||
Reference in New Issue
Block a user