# HG changeset patch
# User Pascal Bellard
# Date 1551166090 -3600
# Node ID 8fcbcf75a8822260c4115b17742edc8e19e3f53e
# Parent 5228d61a7eace9087e156f970d0240a32cf14beb
Remove ashism ==
diff -r 5228d61a7eac -r 8fcbcf75a882 mv-open-closed.sh
--- a/mv-open-closed.sh Thu Jan 10 17:50:37 2019 +0100
+++ b/mv-open-closed.sh Tue Feb 26 08:28:10 2019 +0100
@@ -19,7 +19,7 @@
if [ -f "${bug}/bug.conf" ]; then
. ./${bug}/bug.conf
echo -n "Moving bug: ${bug} $STATUS"
- if [ "$STATUS" == "OPEN" ]; then
+ if [ "$STATUS" = "OPEN" ]; then
mv ${bug} open/ && status
else
mv ${bug} closed/ && status
diff -r 5228d61a7eac -r 8fcbcf75a882 web/bugs.cgi
--- a/web/bugs.cgi Thu Jan 10 17:50:37 2019 +0100
+++ b/web/bugs.cgi Tue Feb 26 08:28:10 2019 +0100
@@ -106,7 +106,7 @@
user="$(echo $auth | cut -d ":" -f 1)"
md5cookie="$(echo $auth | cut -d ":" -f 2)"
[ -f "$sessions/$user" ] && md5session="$(cat $sessions/$user)"
- if [ "$md5cookie" == "$md5session" ] && [ "$auth" ]; then
+ if [ "$md5cookie" = "$md5session" ] && [ "$auth" ]; then
return 0
else
return 1
@@ -179,7 +179,7 @@
# Link for online signup if enabled.
online_signup() {
- if [ "$ONLINE_SIGNUP" == "yes" ]; then
+ if [ "$ONLINE_SIGNUP" = "yes" ]; then
echo -n ""
gettext "Sign Up Online"
echo '
'
@@ -262,7 +262,7 @@
for id in $(ls $bugdir/$status)
do
. $bugdir/$status/$id/bug.conf
- if [ "$PRIORITY" == "$pr" ]; then
+ if [ "$PRIORITY" = "$pr" ]; then
[ -f "${PEOPLE}/${CREATOR}/account.conf" ] && \
. ${PEOPLE}/${CREATOR}/account.conf
cat << EOT
@@ -335,12 +335,12 @@
fi
echo ''
if check_auth; then
- if [ "$STATUS" == "OPEN" ]; then
+ if [ "$STATUS" = "OPEN" ]; then
cat << EOT
$(gettext "Close bug")
EOT
# Only original user and admin can edit a bug
- if [ "$user" == "$CREATOR" ] || admin_user; then
+ if [ "$user" = "$CREATOR" ] || admin_user; then
cat << EOT
$(gettext "Edit bug")
EOT
@@ -356,7 +356,7 @@
$(gettext "Messages")
EOT
- [ "$msgs" == "0" ] && gettext "No messages"
+ [ "$msgs" = "0" ] && gettext "No messages"
for msg in $(ls -1tr $bugdir/$id/msg.*)
do
#
@@ -373,7 +373,7 @@
msgid=$(echo $msg | cut -d "." -f 2)
del=""
# User can delete his post as well as admin.
- if [ "$user" == "$USER" ] || admin_user; then
+ if [ "$user" = "$USER" ] || admin_user; then
del="-
delete"
fi
cat << EOT
@@ -498,7 +498,7 @@
# Edit/Save a bug
edit_bug() {
. $bugdir/$id/bug.conf
- if admin_user || [ "$user" == "$CREATOR" ]; then
+ if admin_user || [ "$user" = "$CREATOR" ]; then
continue
else
gettext "You can't edit someone else's bug!" && exit 0
@@ -605,7 +605,7 @@
EOT
chmod 0600 $PEOPLE/$user/account.conf
# First created user is admin
- if [ $(ls ${PEOPLE} | wc -l) == "1" ]; then
+ if [ $(ls ${PEOPLE} | wc -l) = "1" ]; then
echo "$user" > ${ADMIN_USERS}
fi
}
@@ -635,7 +635,7 @@
fi;
valid=$(fgrep "${user}:" $AUTH_FILE | cut -d ":" -f 2)
- if [ "$pass" == "$valid" ] && [ "$pass" != "" ]; then
+ if [ "$pass" = "$valid" ] && [ "$pass" != "" ]; then
if [[ "$(POST id)" ]] ;then
IDLOC="?id=$(POST id)"
fi
@@ -802,7 +802,7 @@
html_header
user_box
echo "
$(gettext "Sign Up")
"
- if [ "$ONLINE_SIGNUP" == "yes" ]; then
+ if [ "$ONLINE_SIGNUP" = "yes" ]; then
signup_page
else
gettext "Online registration is disabled"
@@ -844,7 +844,7 @@
fi
bugdir=$(dirname $bugdir)
done
- if [ "$found" == "0" ]; then
+ if [ "$found" = "0" ]; then
echo "
$(gettext 'No result found for') : $(GET search)
"
else
echo "
$found $(gettext 'results found')
"
diff -r 5228d61a7eac -r 8fcbcf75a882 web/plugins/mybugs/user.sh
--- a/web/plugins/mybugs/user.sh Thu Jan 10 17:50:37 2019 +0100
+++ b/web/plugins/mybugs/user.sh Tue Feb 26 08:28:10 2019 +0100
@@ -48,7 +48,7 @@
if [ "$show_more" ]; then
echo "
"
- if [ "$HTTP_HOST" == "bugs.slitaz.org" ]; then
+ if [ "$HTTP_HOST" = "bugs.slitaz.org" ]; then
echo "$(gettext 'View all my bugs and messages')"
else
echo "$(gettext 'View all my bugs and debug messages on:') "
diff -r 5228d61a7eac -r 8fcbcf75a882 web/plugins/textmode/textmode.cgi
--- a/web/plugins/textmode/textmode.cgi Thu Jan 10 17:50:37 2019 +0100
+++ b/web/plugins/textmode/textmode.cgi Tue Feb 26 08:28:10 2019 +0100
@@ -29,7 +29,7 @@
fi
bugdir=$(dirname $bugdir)
done
- if [ "$found" == "" ]; then
+ if [ "$found" = "" ]; then
echo "No result found for: $(GET search)"
else
separator && echo "$found result(s) found"
diff -r 5228d61a7eac -r 8fcbcf75a882 web/plugins/users/users.cgi
--- a/web/plugins/users/users.cgi Thu Jan 10 17:50:37 2019 +0100
+++ b/web/plugins/users/users.cgi Tue Feb 26 08:28:10 2019 +0100
@@ -197,7 +197,7 @@
$(gettext "User name :") $USER
$(gettext "Last login :") $last
EOT
- if check_auth && [ "$(GET user)" == "$user" ]; then
+ if check_auth && [ "$(GET user)" = "$user" ]; then
auth_people
else
# check_auth will set VARS to current logged user: re-source