Changeset 126f068 in freewrt
- Timestamp:
- Jun 18, 2006, 10:05:41 PM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- d01b731
- Parents:
- dc1e9d9
- File:
-
- 1 edited
-
package/mksh/ipkg/mksh.postinst (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
package/mksh/ipkg/mksh.postinst
rdc1e9d9 r126f068 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 ' export PS1='\''$(((rv=$?)) && print "$rv|")'\''"\${USER}@$HOSTNAME:"'\''$(typeset tilde=~ path=${1:-${PWD:-$(pwd)}}' >>${IPKG_INSTROOT}/etc/profile11 echo ' typeset dots= path2=${path#$tilde}' >>${IPKG_INSTROOT}/etc/profile12 echo ' [[ $path2 = $path ]] || path='\''~'\''$path2' >>${IPKG_INSTROOT}/etc/profile13 echo ' let cmax="${COLUMNS:-80} / 3"' >>${IPKG_INSTROOT}/etc/profile14 echo ' (( cmax < 7 )) && let cmax=7' >>${IPKG_INSTROOT}/etc/profile15 echo ' while (( (${#dots} + ${#path}) > cmax )); do' >>${IPKG_INSTROOT}/etc/profile16 echo ' if [[ $path = *@(/)* ]]; then' >>${IPKG_INSTROOT}/etc/profile17 echo ' dots=.../' >>${IPKG_INSTROOT}/etc/profile18 echo ' path="${path#*/}"' >>${IPKG_INSTROOT}/etc/profile19 echo ' else' >>${IPKG_INSTROOT}/etc/profile20 echo ' dots=...' >>${IPKG_INSTROOT}/etc/profile21 echo ' path="${path#?????}"' >>${IPKG_INSTROOT}/etc/profile22 echo ' fi' >>${IPKG_INSTROOT}/etc/profile23 echo ' done' >>${IPKG_INSTROOT}/etc/profile10 echo ' export PS1='\''$(((rv=$?)) && print "$rv|")'\''"\${USER}@$HOSTNAME:"'\''$(typeset tilde=~ path=${1:-${PWD:-$(pwd)}}' >>${IPKG_INSTROOT}/etc/profile 11 echo ' typeset dots= path2=${path#$tilde}' >>${IPKG_INSTROOT}/etc/profile 12 echo ' [[ $path2 = $path ]] || path='\''~'\''$path2' >>${IPKG_INSTROOT}/etc/profile 13 echo ' let cmax="${COLUMNS:-80} / 3"' >>${IPKG_INSTROOT}/etc/profile 14 echo ' (( cmax < 7 )) && let cmax=7' >>${IPKG_INSTROOT}/etc/profile 15 echo ' while (( (${#dots} + ${#path}) > cmax )); do' >>${IPKG_INSTROOT}/etc/profile 16 echo ' if [[ $path = *@(/)* ]]; then' >>${IPKG_INSTROOT}/etc/profile 17 echo ' dots=.../' >>${IPKG_INSTROOT}/etc/profile 18 echo ' path="${path#*/}"' >>${IPKG_INSTROOT}/etc/profile 19 echo ' else' >>${IPKG_INSTROOT}/etc/profile 20 echo ' dots=...' >>${IPKG_INSTROOT}/etc/profile 21 echo ' path="${path#?????}"' >>${IPKG_INSTROOT}/etc/profile 22 echo ' fi' >>${IPKG_INSTROOT}/etc/profile 23 echo ' done' >>${IPKG_INSTROOT}/etc/profile 24 24 echo ' print -nr -- "$dots$path")'\''" $(if [[ $(id -u) -eq 0 ]]; then' >>${IPKG_INSTROOT}/etc/profile 25 echo ' echo -n '\''#'\''; else echo -n '\''$'\''; fi) "' >>${IPKG_INSTROOT}/etc/profile25 echo ' echo -n '\''#'\''; else echo -n '\''$'\''; fi) "' >>${IPKG_INSTROOT}/etc/profile 26 26 echo 'fi' >>${IPKG_INSTROOT}/etc/profile 27 27 fi
Note:
See TracChangeset
for help on using the changeset viewer.
