From 9a234451640e0ea07fbe84132dac9b856abd5196 Mon Sep 17 00:00:00 2001 From: cronyx Date: Tue, 9 Aug 2022 23:23:02 +0300 Subject: [PATCH] correct link to download ipctool for mips32 --- general/overlay/etc/profile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/general/overlay/etc/profile b/general/overlay/etc/profile index 31117977..f4898fc9 100644 --- a/general/overlay/etc/profile +++ b/general/overlay/etc/profile @@ -3,6 +3,7 @@ export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6) export HOME=${HOME:-/root} export TZ=$(cat /etc/TZ) export SENSOR=$(fw_printenv -n sensor) +export ARCH=$(uname -m) echo_c() { echo -ne "\e[1;$1m$2\e[0m"; } @@ -19,15 +20,19 @@ if [ "$PS1" ]; then fi fi -export EDITOR='/bin/vi' +if echo $ARCH | grep -q mips; then + export ARC='-mips32' +else + export ARC='' +fi +export EDITOR='/bin/vi' [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } cli() { yaml-cli -i /etc/majestic.yaml $@; } -#[ -x /tmp/ipctool ] || ipctool() { [ -x /tmp/ipctool ] && /tmp/ipctool $@ || (curl -s -L -o /tmp/ipctool https://github.com/OpenIPC/ipctool/releases/download/latest/ipctool-$(uname -m) && \ -[ -x /tmp/ipctool ] || ipctool() { [ -x /tmp/ipctool ] && /tmp/ipctool $@ || (curl -s -L -o /tmp/ipctool https://github.com/OpenIPC/ipctool/releases/download/latest/ipctool && \ +[ -x /tmp/ipctool ] || ipctool() { [ -x /tmp/ipctool ] && /tmp/ipctool $@ || (curl -s -L -o /tmp/ipctool https://github.com/OpenIPC/ipctool/releases/download/latest/ipctool$ARC && \ chmod +x /tmp/ipctool && echo_c 35 "The ipctool installed as remote GitHub plugin" && /tmp/ipctool $@); } majestic_changes() { diff -L "Majestic changes" -U 3 /rom/etc/majestic.yaml /etc/majestic.yaml; }