1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searxng_ynh.git synced 2024-09-03 20:26:00 +02:00

Refractor

This commit is contained in:
Sylvain 2024-07-22 09:44:55 +02:00
parent 9d464579ae
commit 69c087cf29

View file

@ -15,17 +15,17 @@ myynh_source_searxng () {
commit_sha=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | xargs basename --suffix=".tar.gz") commit_sha=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | xargs basename --suffix=".tar.gz")
# Download source # Download source
sudo -H -u $app -i << EOF sudo -H -u $app -i bash << EOF
if [ ! -d "$install_dir/searxng-src" ] if [ ! -d "$install_dir/searxng-src" ]
then then
mkdir "$install_dir/searxng-src" mkdir "$install_dir/searxng-src"
endif fi
git clone -n "$repo_fullpath" "$install_dir/searxng-src" 2>&1 git clone -n "$repo_fullpath" "$install_dir/searxng-src" 2>&1
EOF EOF
# Checkout commit # Checkout commit
pushd "$install_dir/searxng-src" pushd "$install_dir/searxng-src"
sudo -H -u $app -i << EOF sudo -H -u $app -i bash << EOF
cd "$install_dir/searxng-src" cd "$install_dir/searxng-src"
git checkout "$commit_sha" 2>&1 git checkout "$commit_sha" 2>&1
EOF EOF