-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmac_install.sh
More file actions
23 lines (16 loc) · 825 Bytes
/
Copy pathmac_install.sh
File metadata and controls
23 lines (16 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Find path to Framework folder of current version and save it as variable
findPath="`find /Applications/Vivaldi.app -name Vivaldi\ Framework.framework`"
# Copy custom files to Vivaldi.app
cp ./mods/custom.css "$findPath"/Resources/vivaldi/style/
cp ./mods/custom.js "$findPath"/Resources/vivaldi/
# Save path to browser.html as variable
browserHtml="$findPath"/Resources/vivaldi/browser.html
# Insert references, if not present, and save to temporary file
sed 's| </head>| <link rel="stylesheet" href="style/custom.css" /></head>|;s| </body>| <script src="custom.js"></script></body>|' "$browserHtml" > "$browserHtml".temp
# Backup original file
cp "$browserHtml" "$browserHtml".bak
# Overwrite
mv "$browserHtml".temp "$browserHtml"
# Pause script
read -rsp $'Press [Enter] to close install...\n'