mirror of
https://github.com/YunoHost-Apps/snweb_ynh.git
synced 2024-09-03 20:26:22 +02:00
Update: Add app.src and modify install and upgrade script
This commit is contained in:
parent
8d0c745a0c
commit
2988e59609
3 changed files with 10 additions and 30 deletions
7
conf/app.src
Normal file
7
conf/app.src
Normal file
|
@ -0,0 +1,7 @@
|
|||
SOURCE_URL=https://github.com/standardnotes/app/archive/refs/tags/3.20.2.tar.gz
|
||||
SOURCE_SUM=6EE98FA8CEDCC7743419ED528E0A5B5AF5253373895AEC3E87EFFCA7D150122B
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=true
|
|
@ -90,20 +90,7 @@ ynh_script_progression --message="Setting up source files..." --weight=16
|
|||
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
mkdir -p "$final_path/live"
|
||||
git clone $SOURCE "$final_path/live" --quiet
|
||||
pushd "$final_path/live"
|
||||
git checkout $COMMIT --quiet
|
||||
git submodule update --init --recursive --quiet
|
||||
popd
|
||||
|
||||
# Apply Patch
|
||||
if [ -f "$YNH_CWD/../sources/patches/app-00-add-path-url.patch" ]
|
||||
then
|
||||
pushd "$final_path/live"
|
||||
patch --strip=1 < "$YNH_CWD/../sources/patches/app-00-add-path-url.patch"
|
||||
popd
|
||||
fi
|
||||
ynh_setup_source --dest_dir="$final_path/live"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
|
|
|
@ -98,22 +98,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=17
|
||||
|
||||
# Remove destination directory
|
||||
ynh_secure_remove --file=$final_path
|
||||
# Download
|
||||
mkdir -p "$final_path"
|
||||
git clone $SOURCE "$final_path/live" --quiet
|
||||
pushd "$final_path/live"
|
||||
git checkout $COMMIT --quiet
|
||||
git submodule update --init --recursive --quiet
|
||||
popd
|
||||
# Apply Patch
|
||||
if [ -f "$YNH_CWD/../sources/patches/app-00-add-path-url.patch" ]
|
||||
then
|
||||
pushd "$final_path/live"
|
||||
patch --strip=1 < "$YNH_CWD/../sources/patches/app-00-add-path-url.patch"
|
||||
popd
|
||||
fi
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path/live"
|
||||
fi
|
||||
|
||||
# Set permissions to app files
|
||||
|
|
Loading…
Add table
Reference in a new issue