mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
fix the misuse of Here document (preventing manual imports)
This commit is contained in:
parent
729d71536f
commit
0c40266991
3 changed files with 18 additions and 10 deletions
|
@ -8,7 +8,7 @@
|
|||
"description": {
|
||||
"en": "A modern, convivial and free music server"
|
||||
},
|
||||
"version": "0.17.0~ynh2",
|
||||
"version": "0.17.0~ynh3",
|
||||
"url": "https://funkwhale.audio",
|
||||
"license": "BSD-3-Clause",
|
||||
"maintainer": {
|
||||
|
@ -47,4 +47,4 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -172,12 +172,16 @@ ynh_replace_string "__DBNAME__" "$app" "$configfile"
|
|||
ynh_replace_string "__FINALPATH__" "$final_path" "$configfile"
|
||||
ynh_replace_string "__KEY__" "$key" "$configfile"
|
||||
|
||||
cat > "$final_path/code/load_env" <<'EOL'
|
||||
loadfile="$final_path/code/load_env"
|
||||
|
||||
cat > "$loadfile" <<'EOL'
|
||||
#!/bin/bash
|
||||
export $(cat "$final_path/code/config/.env" | grep -v ^# | xargs)
|
||||
export $(cat "__FINALPATH__/code/config/.env" | grep -v ^# | xargs)
|
||||
EOL
|
||||
|
||||
chmod +x "$final_path/code/load_env"
|
||||
chmod +x "$loadfile"
|
||||
|
||||
ynh_replace_string "__FINALPATH__" "$final_path" "$loadfile"
|
||||
|
||||
#=================================================
|
||||
# MODIFY THE CONFIG FILE
|
||||
|
@ -187,7 +191,7 @@ admin_mail=$(ynh_user_get_info "$admin" "mail")
|
|||
(
|
||||
set +o nounset
|
||||
source "${final_path}/code/virtualenv/bin/activate"
|
||||
source "${final_path}/code/load_env"
|
||||
source "$loadfile"
|
||||
set -o nounset
|
||||
cd "$final_path/code/"
|
||||
|
||||
|
|
|
@ -175,12 +175,16 @@ ynh_replace_string "__DBNAME__" "$app" "$configfile"
|
|||
ynh_replace_string "__FINALPATH__" "$final_path" "$configfile"
|
||||
ynh_replace_string "__KEY__" "$key" "$configfile"
|
||||
|
||||
cat > "$final_path/code/load_env" <<'EOL'
|
||||
loadfile="$final_path/code/load_env"
|
||||
|
||||
cat > "$loadfile" <<'EOL'
|
||||
#!/bin/bash
|
||||
export $(cat "$final_path/code/config/.env" | grep -v ^# | xargs)
|
||||
export $(cat "__FINALPATH__/code/config/.env" | grep -v ^# | xargs)
|
||||
EOL
|
||||
|
||||
chmod +x "$final_path/code/load_env"
|
||||
chmod +x "$loadfile"
|
||||
|
||||
ynh_replace_string "__FINALPATH__" "$final_path" "$loadfile"
|
||||
|
||||
#=================================================
|
||||
# MIGRATE
|
||||
|
@ -189,7 +193,7 @@ chmod +x "$final_path/code/load_env"
|
|||
(
|
||||
set +o nounset
|
||||
source "${final_path}/code/virtualenv/bin/activate"
|
||||
source "${final_path}/code/load_env"
|
||||
source "$loadfile"
|
||||
set -o nounset
|
||||
cd "$final_path/code"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue