1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

escaping sed quotes correctly

This commit is contained in:
George Hunt 2021-09-02 21:14:17 +01:00
parent aabcda094e
commit 979270dcc2

View file

@ -9,11 +9,11 @@ if [ $? -ne 0 ];then
else
echo Await patch already applied. Skipping. . .
fi
cat $SITE_PACKAGES/firstuseauthenticator/firstuseauthenticator.py |grep data['data'].lower()'
cat $SITE_PACKAGES/firstuseauthenticator/firstuseauthenticator.py |grep "data\['username'\].lower\(\)"
if [ $? -ne 0 ];then
echo Updating to data['username'].lower()
sed -i -e's/data['username']/data['username'].lower()/' $SITE_PACKAGES/firstuseauthenticator/firstuseauthenticator.py
echo Updating to data['username'].lower\(\)
sed -i -e"s/data\['username'\]/data\['username'\].lower\(\)/" $SITE_PACKAGES/firstuseauthenticator/firstuseauthenticator.py
else
echo username.lower() patch already applied. Skipping. . .
echo username.lower\(\) patch already applied. Skipping. . .
fi