if [ ! -r etc/shells ]; then
  touch etc/shells
  chmod 644 etc/shells
fi

if ! grep -q /bin/osh etc/shells ; then
  printf %s\\n /bin/osh >> etc/shells
fi

if ! grep -q /bin/ysh etc/shells ; then
  printf %s\\n /bin/ysh >> etc/shells
fi
( cd bin ; rm -rf osh )
( cd bin ; ln -sf oils-for-unix osh )
( cd bin ; rm -rf ysh )
( cd bin ; ln -sf oils-for-unix ysh )
( cd usr/bin ; rm -rf oils-for-unix )
( cd usr/bin ; ln -sf /bin/oils-for-unix oils-for-unix )
( cd usr/bin ; rm -rf osh )
( cd usr/bin ; ln -sf /bin/osh osh )
( cd usr/bin ; rm -rf ysh )
( cd usr/bin ; ln -sf /bin/ysh ysh )
