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"
|
source "$import"
|
||||||
|
|
||||||
echo "${BLUE}Sourcing external script:${NC} $url"
|
echo "${BLUE}Sourcing external script:${NC} $url"
|
||||||
line
|
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
rm -f "$import"
|
rm -f "$import"
|
||||||
fi
|
fi
|
||||||
|
@ -41,6 +40,7 @@
|
||||||
# echo "DEBUG: Installing ${deps[@]}"
|
# echo "DEBUG: Installing ${deps[@]}"
|
||||||
check-and-install ${deps[@]}
|
check-and-install ${deps[@]}
|
||||||
|
|
||||||
|
pen bold yellow "Checking cargo.."
|
||||||
if ! command_exists cargo; then
|
if ! command_exists cargo; then
|
||||||
curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
|
curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
|
||||||
else
|
else
|
||||||
|
@ -49,18 +49,32 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
cloneAndBuildSwww() {
|
cloneAndBuildSwww() {
|
||||||
|
local err out
|
||||||
local cloneDir="$(mktemp -d)"
|
local cloneDir="$(mktemp -d)"
|
||||||
echo_pkg clone "cloning swww into $cloneDir/swww"
|
spin bold yellow "cloning swww into $cloneDir/swww"
|
||||||
run git clone --depth=1 https://github.com/LGFae/swww.git $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
|
spin bold yellow "Building $PACKAGE now"
|
||||||
if run cargo build --release; then
|
if run --err err --out out cargo build --release; then
|
||||||
echo_pkg install
|
upclear
|
||||||
|
check bold green "Build $PACKAGE!"
|
||||||
|
pen bold blue "Installing into bin.."
|
||||||
$_sudo cp target/release/swww{,-daemon} /bin/
|
$_sudo cp target/release/swww{,-daemon} /bin/
|
||||||
else
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue