Advertisement
Guest User

Adek336

a guest
Dec 3rd, 2008
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 KB | None | 0 0
  1. Index: src/bin/bash/config-top.h
  2. ===================================================================
  3. --- src/bin/bash/config-top.h (revision 28736)
  4. +++ src/bin/bash/config-top.h (working copy)
  5. @@ -73,7 +73,7 @@
  6. #define KSH_COMPATIBLE_SELECT
  7.  
  8. /* System-wide .bashrc file for interactive shells. */
  9. -/* #define SYS_BASHRC "/etc/bash.bashrc" */
  10. +#define SYS_BASHRC "/etc/bashrc"
  11.  
  12. /* System-wide .bash_logout for login shells. */
  13. /* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
  14. Index: src/bin/bash/pathnames.h
  15. ===================================================================
  16. --- src/bin/bash/pathnames.h (revision 28736)
  17. +++ src/bin/bash/pathnames.h (working copy)
  18. @@ -25,6 +25,6 @@
  19. #define DEFAULT_HOSTS_FILE "/etc/hosts"
  20.  
  21. /* The default login shell startup file. */
  22. -#define SYS_PROFILE "/etc/profile"
  23. +#define SYS_PROFILE "/etc/bash_profile"
  24.  
  25. #endif /* _PATHNAMES_H */
  26. Index: data/etc/profile
  27. ===================================================================
  28. --- data/etc/profile (revision 28736)
  29. +++ data/etc/profile (working copy)
  30. @@ -1,6 +1,6 @@
  31. #
  32. -# Administrative startup for /bin/sh
  33. -# Place user customizations in /.profile
  34. +# Administrative startup for shells
  35. +# Place user customizations in ~/.profile
  36. #
  37.  
  38. echo -e "\nWelcome to the Haiku shell.\n"
  39. @@ -10,83 +10,3 @@
  40.  
  41. export PS1="\w> "
  42. export HISTFILESIZE=50
  43. -
  44. -alias ls="ls --color"
  45. -alias ll="ls -lA"
  46. -alias la="ls -A"
  47. -alias m="more"
  48. -
  49. -#
  50. -# and now we include a few useful things...
  51. -#
  52. -
  53. -#
  54. -# An almost-ksh compatible `whence' command. This is as hairy as it is
  55. -# because of the desire to exactly mimic ksh.
  56. -#
  57. -# This depends somewhat on knowing the format of the output of the bash
  58. -# `builtin type' command.
  59. -#
  60. -# Chet Ramey
  61. -# chet@ins.CWRU.Edu
  62. -#
  63. -whence()
  64. -{
  65. - local vflag= path=
  66. -
  67. - if [ "$#" = "0" ] ; then
  68. - echo "whence: argument expected"
  69. - return 1
  70. - fi
  71. - case "$1" in
  72. - -v) vflag=1
  73. - shift 1
  74. - ;;
  75. - -*) echo "whence: bad option: $1"
  76. - return 1
  77. - ;;
  78. - *) ;;
  79. - esac
  80. -
  81. - if [ "$#" = "0" ] ; then
  82. - echo "whence: bad argument count"
  83. - return 1
  84. - fi
  85. -
  86. - returnValue=0
  87. -
  88. - for cmd
  89. - do
  90. - if [ "$vflag" ] ; then
  91. - echo $(builtin type $cmd | sed 1q)
  92. - else
  93. - path=$(builtin type -path $cmd)
  94. - if [ "$path" ] ; then
  95. - echo $path
  96. - else
  97. - case "$cmd" in
  98. - */*) if [ -x "$cmd" ]; then
  99. - echo "$cmd"
  100. - else
  101. - returnValue=1
  102. - fi
  103. - ;;
  104. - *) case "$(builtin type -type $cmd)" in
  105. - "") returnValue=1
  106. - ;;
  107. - *) echo "$cmd"
  108. - ;;
  109. - esac
  110. - ;;
  111. - esac
  112. - fi
  113. - fi
  114. - done
  115. - return $returnValue
  116. -}
  117. -
  118. -alias which='whence'
  119. -
  120. -function dir {
  121. - ls -lF "$@";
  122. -}
  123. Index: data/etc/bashrc
  124. ===================================================================
  125. --- data/etc/bashrc (revision 0)
  126. +++ data/etc/bashrc (revision 0)
  127. @@ -0,0 +1,81 @@
  128. +alias ls="ls --color"
  129. +alias ll="ls -lA"
  130. +alias la="ls -A"
  131. +alias m="more"
  132. +
  133. +#
  134. +# and now we include a few useful things...
  135. +#
  136. +
  137. +#
  138. +# An almost-ksh compatible `whence' command. This is as hairy as it is
  139. +# because of the desire to exactly mimic ksh.
  140. +#
  141. +# This depends somewhat on knowing the format of the output of the bash
  142. +# `builtin type' command.
  143. +#
  144. +# Chet Ramey
  145. +# chet@ins.CWRU.Edu
  146. +#
  147. +whence()
  148. +{
  149. + local vflag= path=
  150. +
  151. + if [ "$#" = "0" ] ; then
  152. + echo "whence: argument expected"
  153. + return 1
  154. + fi
  155. + case "$1" in
  156. + -v) vflag=1
  157. + shift 1
  158. + ;;
  159. + -*) echo "whence: bad option: $1"
  160. + return 1
  161. + ;;
  162. + *) ;;
  163. + esac
  164. +
  165. + if [ "$#" = "0" ] ; then
  166. + echo "whence: bad argument count"
  167. + return 1
  168. + fi
  169. +
  170. + returnValue=0
  171. +
  172. + for cmd
  173. + do
  174. + if [ "$vflag" ] ; then
  175. + echo $(builtin type $cmd | sed 1q)
  176. + else
  177. + path=$(builtin type -path $cmd)
  178. + if [ "$path" ] ; then
  179. + echo $path
  180. + else
  181. + case "$cmd" in
  182. + */*) if [ -x "$cmd" ]; then
  183. + echo "$cmd"
  184. + else
  185. + returnValue=1
  186. + fi
  187. + ;;
  188. + *) case "$(builtin type -type $cmd)" in
  189. + "") returnValue=1
  190. + ;;
  191. + *) echo "$cmd"
  192. + ;;
  193. + esac
  194. + ;;
  195. + esac
  196. + fi
  197. + fi
  198. + done
  199. + return $returnValue
  200. +}
  201. +
  202. +alias which='whence'
  203. +
  204. +function dir {
  205. + ls -lF "$@";
  206. +}
  207. +
  208. +shopt -s checkwinsize
  209. Index: data/etc/bash_profile
  210. ===================================================================
  211. --- data/etc/bash_profile (revision 0)
  212. +++ data/etc/bash_profile (revision 0)
  213. @@ -0,0 +1,7 @@
  214. +#
  215. +# Administrative startup for Bash
  216. +# Place user customizations in ~/.bash_profile
  217. +#
  218. +
  219. +source /etc/profile
  220. +source /etc/bashrc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement