mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-07-05 11:11:13 +00:00
update install / uninnstall scripts
This commit is contained in:
parent
4ff04c543c
commit
5f11dffb7a
3 changed files with 11 additions and 13 deletions
10
install.ps1
10
install.ps1
|
|
@ -45,6 +45,7 @@ if ($PSVersionTable.PSVersion.Major -gt $PSMinVersion) {
|
||||||
Write-Done
|
Write-Done
|
||||||
|
|
||||||
$version = ($latest_release_json | ConvertFrom-Json).tag_name -replace "v", ""
|
$version = ($latest_release_json | ConvertFrom-Json).tag_name -replace "v", ""
|
||||||
|
$download_uri = ($latest_release_json | ConvertFrom-Json).assets[0].browser_download_url
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check ~\spicetify-cli\Themes directory already exists
|
# Check ~\spicetify-cli\Themes directory already exists
|
||||||
|
|
@ -57,7 +58,6 @@ if ($PSVersionTable.PSVersion.Major -gt $PSMinVersion) {
|
||||||
|
|
||||||
# Download release.
|
# Download release.
|
||||||
$zip_file = "${sp_dir}\${version}.zip"
|
$zip_file = "${sp_dir}\${version}.zip"
|
||||||
$download_uri = "https://github.com/JulienMaille/dribbblish-dynamic-theme/archive/refs/tags/${version}.zip"
|
|
||||||
Write-Part "DOWNLOADING "; Write-Emphasized $download_uri
|
Write-Part "DOWNLOADING "; Write-Emphasized $download_uri
|
||||||
Invoke-WebRequest -Uri $download_uri -UseBasicParsing -OutFile $zip_file
|
Invoke-WebRequest -Uri $download_uri -UseBasicParsing -OutFile $zip_file
|
||||||
Write-Done
|
Write-Done
|
||||||
|
|
@ -65,7 +65,7 @@ if ($PSVersionTable.PSVersion.Major -gt $PSMinVersion) {
|
||||||
# Extract theme from .zip file.
|
# Extract theme from .zip file.
|
||||||
Write-Part "EXTRACTING "; Write-Emphasized $zip_file
|
Write-Part "EXTRACTING "; Write-Emphasized $zip_file
|
||||||
Write-Part " into "; Write-Emphasized ${sp_dir};
|
Write-Part " into "; Write-Emphasized ${sp_dir};
|
||||||
Expand-Archive -Path $zip_file -DestinationPath $sp_dir -Force
|
Expand-Archive -Path $zip_file -DestinationPath "${sp_dir}\dribbblish-dynamic-theme-${version}" -Force
|
||||||
Write-Done
|
Write-Done
|
||||||
|
|
||||||
# Remove .zip file.
|
# Remove .zip file.
|
||||||
|
|
@ -90,11 +90,9 @@ if ($PSVersionTable.PSVersion.Major -gt $PSMinVersion) {
|
||||||
# Installing.
|
# Installing.
|
||||||
Write-Part "INSTALLING";
|
Write-Part "INSTALLING";
|
||||||
cd $sp_dot_dir
|
cd $sp_dot_dir
|
||||||
Copy-Item dribbblish.js ..\..\Extensions
|
|
||||||
Copy-Item dribbblish-dynamic.js ..\..\Extensions
|
Copy-Item dribbblish-dynamic.js ..\..\Extensions
|
||||||
Copy-Item Vibrant.min.js ..\..\Extensions
|
spicetify config extensions default-dynamic.js- extensions dribbblish-dynamic.js- extensions dribbblish.js- extensions Vibrant.min.js-
|
||||||
spicetify config extensions default-dynamic.js-
|
spicetify config extensions dribbblish-dynamic.js
|
||||||
spicetify config extensions dribbblish.js extensions dribbblish-dynamic.js extensions Vibrant.min.js
|
|
||||||
spicetify config current_theme DribbblishDynamic
|
spicetify config current_theme DribbblishDynamic
|
||||||
spicetify config color_scheme base
|
spicetify config color_scheme base
|
||||||
spicetify config inject_css 1 replace_colors 1 overwrite_assets 1
|
spicetify config inject_css 1 replace_colors 1 overwrite_assets 1
|
||||||
|
|
|
||||||
12
install.sh
12
install.sh
|
|
@ -10,13 +10,14 @@ if [ $# -eq 0 ]; then
|
||||||
version=$( command curl -sSf "$latest_release_uri" |
|
version=$( command curl -sSf "$latest_release_uri" |
|
||||||
command grep -Eo "tag_name\": .*" |
|
command grep -Eo "tag_name\": .*" |
|
||||||
command grep -Eo "[0-9.]+" )
|
command grep -Eo "[0-9.]+" )
|
||||||
|
download_uri=$( command curl -sSf "$latest_release_uri" |
|
||||||
|
command grep -Eo "browser_download_url\": .*" |
|
||||||
|
command grep -Eo "http.*?\.zip" )
|
||||||
if [ ! "$version" ]; then exit 1; fi
|
if [ ! "$version" ]; then exit 1; fi
|
||||||
else
|
else
|
||||||
version="${1}"
|
version="${1}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
download_uri="https://github.com/JulienMaille/dribbblish-dynamic-theme/archive/refs/tags/${version}.zip"
|
|
||||||
|
|
||||||
spicetify_install="${SPICETIFY_INSTALL:-$HOME/spicetify-cli/Themes}"
|
spicetify_install="${SPICETIFY_INSTALL:-$HOME/spicetify-cli/Themes}"
|
||||||
|
|
||||||
if [ ! -d "$spicetify_install" ]; then
|
if [ ! -d "$spicetify_install" ]; then
|
||||||
|
|
@ -31,7 +32,7 @@ curl --fail --location --progress-bar --output "$tar_file" "$download_uri"
|
||||||
cd "$spicetify_install"
|
cd "$spicetify_install"
|
||||||
|
|
||||||
echo "EXTRACTING $tar_file"
|
echo "EXTRACTING $tar_file"
|
||||||
unzip -o "$tar_file"
|
unzip -d "$spicetify_install/dribbblish-dynamic-theme-${version}" -o "$tar_file"
|
||||||
|
|
||||||
echo "REMOVING $tar_file"
|
echo "REMOVING $tar_file"
|
||||||
rm "$tar_file"
|
rm "$tar_file"
|
||||||
|
|
@ -49,10 +50,9 @@ cp -rf "$spicetify_install/dribbblish-dynamic-theme-${version}/." "$sp_dot_dir"
|
||||||
echo "INSTALLING"
|
echo "INSTALLING"
|
||||||
cd "$(dirname "$(spicetify -c)")/Themes/DribbblishDynamic"
|
cd "$(dirname "$(spicetify -c)")/Themes/DribbblishDynamic"
|
||||||
mkdir -p ../../Extensions
|
mkdir -p ../../Extensions
|
||||||
cp dribbblish.js ../../Extensions/.
|
|
||||||
cp dribbblish-dynamic.js ../../Extensions/.
|
cp dribbblish-dynamic.js ../../Extensions/.
|
||||||
cp Vibrant.min.js ../../Extensions/.
|
spicetify config extensions default-dynamic.js- extensions dribbblish-dynamic.js- extensions dribbblish.js- extensions Vibrant.min.js-
|
||||||
spicetify config extensions dribbblish.js extensions dribbblish-dynamic.js extensions Vibrant.min.js
|
spicetify config extensions dribbblish-dynamic.js
|
||||||
spicetify config current_theme DribbblishDynamic
|
spicetify config current_theme DribbblishDynamic
|
||||||
spicetify config color_scheme base
|
spicetify config color_scheme base
|
||||||
spicetify config inject_css 1 replace_colors 1 overwrite_assets 1
|
spicetify config inject_css 1 replace_colors 1 overwrite_assets 1
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
spicetify config current_theme " " extensions dribbblish.js- extensions dribbblish-dynamic.js- extensions Vibrant.min.js-
|
spicetify config current_theme " " extensions dribbblish-dynamic.js-
|
||||||
|
|
||||||
$spicePath = spicetify -c | Split-Path
|
$spicePath = spicetify -c | Split-Path
|
||||||
$configFile = Get-Content "$spicePath\config-xpui.ini"
|
$configFile = Get-Content "$spicePath\config-xpui.ini"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue