diff --git a/scripts/_common.sh b/scripts/_common.sh index a8bdbb9..ebb9161 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,26 +8,6 @@ # PERSONAL HELPERS #================================================= -# custom function to detect armv6 and armv7 -# ($YNH_ARCH returns armhf for both...) -detect_arch(){ - local architecture - if uname -m | grep -q -E "arm64|aarch64" ; then - architecture="arm64" - elif uname -m | grep -q "64" ; then - architecture="amd64" - elif uname -m | grep -q "86" ; then - architecture="i386" - elif uname -m | grep -q "armv6" ; then - architecture="armv6" - elif uname -m | grep -q "armv7" ; then - architecture="armv7" - else - ynh_die --message="The script can't identify a valid architecture. Please report this error." - fi - echo $architecture -} - # custom function to change bash bool 0/1 to false/true convert_bool(){ (("$1")) && echo "true" || echo "false" diff --git a/scripts/install b/scripts/install index 980c26e..7ecfe6e 100755 --- a/scripts/install +++ b/scripts/install @@ -157,9 +157,6 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ### downloaded from an upstream source, like a git repository. ### `ynh_setup_source` use the file conf/app.src -# detect_arch comes from _common.sh / personnal helpers -architecture=$(detect_arch) - # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" diff --git a/scripts/restore b/scripts/restore index b6c8bee..2170b88 100755 --- a/scripts/restore +++ b/scripts/restore @@ -67,9 +67,6 @@ ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -# detect_arch comes from _common.sh / personnal helpers -architecture="$(detect_arch)" - # compare if the system arch is different from the binary arch # if so, download the correct binary if [ "$architecture" != "$(file "$install_dir"/gotosocial | cut -d ',' -f 2 | tr -d ' ')" ] diff --git a/scripts/upgrade b/scripts/upgrade index 759b680..7dd22f2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -287,9 +287,6 @@ fi if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." - - # detect_arch comes from _common.sh / personnal helpers - architecture=$(detect_arch) # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config.yaml"