Skip to content

Commit

Permalink
Installer: Fail if root & -u is used at the same time.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoquesada committed May 31, 2011
1 parent 1135377 commit 88c2fbf
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cocos2d for iPhone authors
--------------------------

Lead Developer:
Ricardo Quesada (http://www.sapusmedia.com)
Ricardo Quesada (http://www.zynga.com)

Developers:
Valentin Milea
Expand Down
2 changes: 1 addition & 1 deletion LICENSE_cocos2d.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cocos2d for iPhone: http://www.cocos2d-iphone.org

Copyright (c) 2008-2011 - Ricardo Quesada and contributors
Copyright (c) 2011 - Zynga Inc. and contributors
(see each file to see the different copyright owners)


Expand Down
13 changes: 13 additions & 0 deletions install-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ if [[ ! $user_dir && "$(id -u)" != "0" ]]; then
exit 1
fi

# Make sure root and user_dir is not executed at the same time
if [[ $user_dir && "$(id -u)" == "0" ]]; then
echo ""
echo "Error: Do not run this script as root with the '-u' option." 1>&2
echo ""
echo "Either use the '-u' option or run it as root, but not both options at the same time." 1>&2
echo ""
echo "RECOMMENDED WAY:" 1>&2
echo " $0 -u -f" 1>&2
echo ""
exit 1
fi


copy_files(){
SRC_DIR="${SCRIPT_DIR}/${1}"
Expand Down
2 changes: 1 addition & 1 deletion templates/Xcode3_templates/cocos2d_app/LICENSE.cocos2d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cocos2d for iPhone: http://www.cocos2d-iphone.org

Copyright (c) 2008-2010 - Ricardo Quesada and contributors
Copyright (c) 2011 - Zynga Inc. and contributors
(see each file to see the different copyright owners)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cocos2d for iPhone: http://www.cocos2d-iphone.org

Copyright (c) 2008-2010 - Ricardo Quesada and contributors
Copyright (c) 2011 - Zynga Inc. and contributors
(see each file to see the different copyright owners)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cocos2d for iPhone: http://www.cocos2d-iphone.org

Copyright (c) 2008-2010 - Ricardo Quesada and contributors
Copyright (c) 2011 - Zynga Inc. and contributors
(see each file to see the different copyright owners)


Expand Down

0 comments on commit 88c2fbf

Please sign in to comment.