adapting for dream use
This commit is contained in:
parent
62db6f7f05
commit
f3029a682c
1 changed files with 22 additions and 8 deletions
30
swww.sh
30
swww.sh
|
@ -29,7 +29,6 @@
|
|||
source "$import"
|
||||
|
||||
echo "${BLUE}Sourcing external script:${NC} $url"
|
||||
line
|
||||
sleep 0.1
|
||||
rm -f "$import"
|
||||
fi
|
||||
|
@ -41,6 +40,7 @@
|
|||
# echo "DEBUG: Installing ${deps[@]}"
|
||||
check-and-install ${deps[@]}
|
||||
|
||||
pen bold yellow "Checking cargo.."
|
||||
if ! command_exists cargo; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
|
||||
else
|
||||
|
@ -49,18 +49,32 @@
|
|||
}
|
||||
|
||||
cloneAndBuildSwww() {
|
||||
local err out
|
||||
local cloneDir="$(mktemp -d)"
|
||||
echo_pkg clone "cloning swww into $cloneDir/swww"
|
||||
run git clone --depth=1 https://github.com/LGFae/swww.git $cloneDir/swww
|
||||
spin bold yellow "cloning swww into $cloneDir/swww"
|
||||
if run --err err --out out git clone --depth=1 https://github.com/LGFae/swww.git $cloneDir/swww; then
|
||||
upclear
|
||||
check bold green "Cloned $PACKAGE successfully"
|
||||
else
|
||||
upclear
|
||||
throw bold red "Error cloning $PACKAGE!"
|
||||
pen bold yellow "OUT: ${out:-}"
|
||||
echo-error "${err:-}"
|
||||
fi
|
||||
|
||||
cd $cloneDir/swww || echo_error "error.."
|
||||
cd $cloneDir/swww || echo-error "error.."
|
||||
|
||||
echo_pkg build
|
||||
if run cargo build --release; then
|
||||
echo_pkg install
|
||||
spin bold yellow "Building $PACKAGE now"
|
||||
if run --err err --out out cargo build --release; then
|
||||
upclear
|
||||
check bold green "Build $PACKAGE!"
|
||||
pen bold blue "Installing into bin.."
|
||||
$_sudo cp target/release/swww{,-daemon} /bin/
|
||||
else
|
||||
echo_error "Could not build with cargo build --release.."
|
||||
upclear
|
||||
throw bold red "Could not build $PACKAGE!"
|
||||
pen bold yellow "OUT: ${out:-}"
|
||||
echo-error "${err:-}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue