This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
tuxbliki/bin/create_first_user.sh

14 lines
316 B
Bash
Raw Normal View History

2008-06-27 00:13:15 -04:00
#!/bin/bash
if [[ $# -ne 1 ]] ; then
echo Usage: $0 [username]
exit 1
fi
merb -i << EOF
a = Author.create :name => '$1', :password => 'password', :password_confirmation => 'password'
p = Permission.find_by_name('change_permissions')
p ||= Permission.create :name => 'change_permissions'
a.permissions << p
EOF