blob: 7247af3527407368550d78def91c19ca5d2e7743 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/usr/bin/env sh
# yt - A fully featured command line YouTube client
#
# Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of Yt.
#
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
root="$(git rev-parse --show-toplevel)"
cd "$root" || {
echo "There seems to be no root?" 2>&1
exit 1
}
db_dir="$(mktemp -d)"
db="$db_dir/db.sqlite"
[ "$1" = "--keep" ] || cargo build --profile=profiling
./target/profiling/yt --db-path "$db" subscriptions add --name 'Kurzgesagt – In a Nutshell - Videos' 'https://www.youtube.com/@kurzgesagt/videos/'
./target/profiling/yt --db-path "$db" update --max-backlog 20 --subscriptions="Kurzgesagt – In a Nutshell - Videos"
hyperfine --show-output --max-runs 5 --min-runs 3 -- "./target/profiling/yt --db-path '$db' update --max-backlog 20 --subscriptions='Kurzgesagt – In a Nutshell - Videos'"
rm "$db"
rm --directory "$db_dir"
# vim: ft=sh
|