Changeset 3b38709 in freewrt
- Timestamp:
- Jul 4, 2006, 3:09:40 AM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- 8d193bb
- Parents:
- 8641ba2
- Location:
- package/mksh
- Files:
-
- 2 edited
-
Makefile (modified) (1 diff)
-
ipkg/mksh.postinst (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
package/mksh/Makefile
r8641ba2 r3b38709 5 5 PKG_NAME= mksh 6 6 PKG_VERSION= 27.4 7 PKG_RELEASE= 17 PKG_RELEASE= 2 8 8 PKG_SOURCE= ${PKG_NAME}-R27e.cpio.gz 9 9 PKG_MD5SUM= 2eeb5c5fab32cc7a20ca3c7c2c6fda46 -
package/mksh/ipkg/mksh.postinst
r8641ba2 r3b38709 8 8 if ! grep KSH_VERSION ${IPKG_INSTROOT}/etc/profile >/dev/null 2>&1; then 9 9 echo 'if test -n "$KSH_VERSION"; then' >>${IPKG_INSTROOT}/etc/profile 10 echo ' [[ -z $HOSTNAME ]] && export HOSTNAME=$(</proc/sys/kernel/hostname)' >>${IPKG_INSTROOT}/etc/profile 11 echo ' export PS1='\''$(((rv=$?)) && print $rv\|)'\''"\$USER@${HOSTNAME:-noFQDN}:"'\''$(' >>${IPKG_INSTROOT}/etc/profile 12 echo ' typeset tilde=~ path=${1:-${PWD:-$(pwd)}}' >>${IPKG_INSTROOT}/etc/profile 13 echo ' typeset dots= path2=${path#$tilde}' >>${IPKG_INSTROOT}/etc/profile 14 echo ' [[ $path2 = $path || -z $tilde || $tilde = / ]] || path=\~$path2' >>${IPKG_INSTROOT}/etc/profile 15 echo ' let cmax="${COLUMNS:-80} / 3"' >>${IPKG_INSTROOT}/etc/profile 16 echo ' (( cmax < 7 )) && let cmax=7' >>${IPKG_INSTROOT}/etc/profile 17 echo ' while (( (${#dots} + ${#path}) > cmax )); do' >>${IPKG_INSTROOT}/etc/profile 18 echo ' if [[ $path = *@(/)* ]]; then' >>${IPKG_INSTROOT}/etc/profile 19 echo ' dots=.../' >>${IPKG_INSTROOT}/etc/profile 20 echo ' path="${path#*/}"' >>${IPKG_INSTROOT}/etc/profile 10 echo ' : ${HOSTNAME:=$(hostname -s </proc/sys/kernel/hostname)}' >>${IPKG_INSTROOT}/etc/profile 11 echo ' PS1='\''$(((rv=$?)) && print $rv\|)${USER:=$(id -un)}@${HOSTNAME:=nil}:$(' >>${IPKG_INSTROOT}/etc/profile 12 echo ' typeset pfx=~ wd=${PWD:-$(pwd)}' >>${IPKG_INSTROOT}/etc/profile 13 echo ' [[ ${wd#$pfx} = $wd || $pfx = ?(/) ]] || wd=\~${wd#$pfx}' >>${IPKG_INSTROOT}/etc/profile 14 echo ' pfx=; let n="( (n = ${COLUMNS:-80} / 3) < 7 ? 7 : n)"' >>${IPKG_INSTROOT}/etc/profile 15 echo ' while (( (${#pfx} + ${#wd}) > n )); do' >>${IPKG_INSTROOT}/etc/profile 16 echo ' if [[ $wd = */* ]]; then' >>${IPKG_INSTROOT}/etc/profile 17 echo ' pfx=.../' >>${IPKG_INSTROOT}/etc/profile 18 echo ' wd="${wd#*/}"' >>${IPKG_INSTROOT}/etc/profile 21 19 echo ' else' >>${IPKG_INSTROOT}/etc/profile 22 echo ' dots=...' >>${IPKG_INSTROOT}/etc/profile23 echo ' path="${path#?????}"' >>${IPKG_INSTROOT}/etc/profile20 echo ' pfx=...' >>${IPKG_INSTROOT}/etc/profile 21 echo ' wd="${wd#?????}"' >>${IPKG_INSTROOT}/etc/profile 24 22 echo ' fi' >>${IPKG_INSTROOT}/etc/profile 25 23 echo ' done' >>${IPKG_INSTROOT}/etc/profile 26 echo ' print - nr -- "$dots$path")'\''" $(if (( $(id -u) )); then' >>${IPKG_INSTROOT}/etc/profile24 echo ' print -r -- "$pfx$wd")'\''" $(if (( $(id -u) )); then' >>${IPKG_INSTROOT}/etc/profile 27 25 echo ' print -n \$; else print -n \#; fi) "' >>${IPKG_INSTROOT}/etc/profile 26 echo ' export HOSTNAME PS1 USER' >>${IPKG_INSTROOT}/etc/profile 28 27 echo 'fi' >>${IPKG_INSTROOT}/etc/profile 29 28 fi
Note:
See TracChangeset
for help on using the changeset viewer.
