mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-06-08 09:12:22 +00:00
WIP: bash install script
This commit is contained in:
parent
b623190274
commit
f1848be00f
2 changed files with 62 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ Run these commands:
|
||||||
### Linux and MacOS:
|
### Linux and MacOS:
|
||||||
In **Bash**:
|
In **Bash**:
|
||||||
```bash
|
```bash
|
||||||
cd "$(dirname "$(spicetify -c)")/Themes/Dribbblish"
|
cd "$(dirname "$(spicetify -c)")/Themes/DribbblishDynamic"
|
||||||
mkdir -p ../../Extensions
|
mkdir -p ../../Extensions
|
||||||
cp dribbblish.js ../../Extensions/.
|
cp dribbblish.js ../../Extensions/.
|
||||||
cp dribbblish-dynamic.js ../../Extensions/.
|
cp dribbblish-dynamic.js ../../Extensions/.
|
||||||
|
|
|
||||||
61
install.sh
Normal file
61
install.sh
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Copyright 2019 khanhas. GPL license.
|
||||||
|
# Edited from project Denoland install script (https://github.com/denoland/deno_install)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
latest_release_uri="https://api.github.com/repos/JulienMaille/dribbblish-dynamic-theme/releases/latest"
|
||||||
|
echo "DOWNLOADING $latest_release_uri"
|
||||||
|
version=$(
|
||||||
|
command curl -sSf "$latest_release_uri" |
|
||||||
|
command grep -Po '(?<="tag_name": ")[0-9.]*'
|
||||||
|
)
|
||||||
|
if [ ! "$version" ]; then exit 1; fi
|
||||||
|
else
|
||||||
|
version="${1}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
download_uri="https://github.com/JulienMaille/dribbblish-dynamic-theme/archive/refs/tags/${version}.zip"
|
||||||
|
|
||||||
|
spicetify_install="${SPICETIFY_INSTALL:-$HOME/spicetify-cli/Themes}"
|
||||||
|
|
||||||
|
if [ ! -d "$spicetify_install" ]; then
|
||||||
|
echo "MAKING FOLDER $spicetify_install";
|
||||||
|
mkdir -p "$spicetify_install"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tar_file="$spicetify_install/${version}.zip"
|
||||||
|
|
||||||
|
echo "DOWNLOADING $download_uri"
|
||||||
|
curl --fail --location --progress-bar --output "$tar_file" "$download_uri"
|
||||||
|
cd "$spicetify_install"
|
||||||
|
|
||||||
|
echo "EXTRACTING $tar_file"
|
||||||
|
unzip "$tar_file"
|
||||||
|
|
||||||
|
echo "REMOVING $tar_file"
|
||||||
|
rm "$tar_file"
|
||||||
|
|
||||||
|
# Check ~\.spicetify.\Themes directory already exists
|
||||||
|
sp_dot_dir="$(dirname "$(spicetify -c)")/Themes/DribbblishDynamic"
|
||||||
|
if [ ! -d "$sp_dot_dir" ]; then
|
||||||
|
echo "MAKING FOLDER $sp_dot_dir";
|
||||||
|
mkdir -p "$sp_dot_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "COPYING"
|
||||||
|
cp -rf "$spicetify_install/dribbblish-dynamic-theme-${version}/." "$sp_dot_dir"
|
||||||
|
|
||||||
|
echo "INSTALLING"
|
||||||
|
cd "$(dirname "$(spicetify -c)")/Themes/DribbblishDynamic"
|
||||||
|
mkdir -p ../../Extensions
|
||||||
|
cp dribbblish.js ../../Extensions/.
|
||||||
|
cp dribbblish-dynamic.js ../../Extensions/.
|
||||||
|
cp Vibrant.min.js ../../Extensions/.
|
||||||
|
spicetify config extensions dribbblish.js
|
||||||
|
spicetify config extensions dribbblish-dynamic.js
|
||||||
|
spicetify config extensions Vibrant.min.js
|
||||||
|
spicetify config current_theme Dribbblish color_scheme base
|
||||||
|
spicetify config inject_css 1 replace_colors 1 overwrite_assets 1
|
||||||
|
spicetify apply
|
||||||
Loading…
Reference in a new issue