Create AdminPageFinder-CLI.sh

Create AdminPageFinder-CLI.sh

#!/bin/bash

#####################################################################################
# Author : Alireza Hafez(4l1k1ng) <hichkas711@gmail.com>                            #
# Name : Admin Page Finder cli Edition						    #
# License : BSD http://en.wikipedia.org/wiki/BSD_license                            #
# Copyright (c) 2014, Alireza Hafez						    #
# All rights reserved.								    #
#                                                                                #
# Redistribution and use in source and binary forms, with or without                #
# modification, are permitted provided that the following conditions are met:       #
#                                                                                #
# 1. Redistributions of source code must retain the above copyright notice, this    #
#    list of conditions and the following disclaimer.                               #
# 2. Redistributions in binary form must reproduce the above copyright notice,      #
#    this list of conditions and the following disclaimer in the documentation      #
#    and/or other materials provided with the distribution.			    #
#										    #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND   #
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED     #
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE            #
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR   #
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    #
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;      #
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND       #
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT        #
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS     #
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                      #
#####################################################################################

declare -a php=("//0admin/login.php" "//0manager/admin.php" "//aaa.php" "//acceso.php" "/acceso.php" "/access.php" "/account/index.php" "//account.php" "//account.php" "/account.php" "/accounts.php" "//acct/login.php" "//ad_admin/admin_login.php" "//add_admin.php" "//addfile.php" "//addlb.php" "//addmember.php" "//add.php" "//adduser.php" "//ad_login.php" "//adm/admloginuser.php" "/adm/admloginuser.php" "//ad_manage.php" "//adm_auth.php" "/adm_auth.php" "/admin1.php" "//admin2/index.php" "/admin2/index.php" "//admin2/login.php" "/admin2/login.php" "//admin2.php" "/admin2.php" "//admin/account.php" "/admin/account.php" "//admin/admin_login.php" "//admin/admin-login.php" "/admin/admin_login.php" "/admin/admin-login.php" "//admin/adminLogin.php" "/admin/adminLogin.php" "//admin/admin.php" "/admin/admin.php" "//admin_area/admin.php" "//adminarea/admin.php" "/admin_area/admin.php" "/adminarea/admin.php" "//admin_area/index.php" "//adminarea/index.php" "/admin_area/index.php" "/adminarea/index.php" "//admin_area/login.php" "//adminarea/login.php" "/admin_area/login.php" "/adminarea/login.php" "/admin_area.php" "//admincontrol/login.php" "/admincontrol/login.php" "//admin/controlpanel.php" "/admin/controlpanel.php" "//admincontrol.php" "/admincontrol.php" "/admincp/login.php" "//admin/cp.php" "/admin/cp.php" "/admin/default.php" "//adm/index.php" "/adm/index.php" "//admin/home.php" "/admin/home.php" "//admin/index.php" "/admin/index.php" "/administr8.php" "/administration.php" "//administrator/account.php" "/administrator/account.php" "/administrator/default.php" "//administrator/index.php" "/administrator/index.php" "/administrator/index.php" "//administrator/login.php" "//administratorlogin.php" "/administrator/login.php" "/administratorlogin.php" "//administrator.php" "/administrator.php" "/administrators.php" "/adminitem.php" "/adminitems.php" "//admin_login.php" "//admin-login.php" "//admin/login.php" "//adminlogin.php" "/admin_login.php" "/admin-login.php" "/admin/login.php" "/admin/login.php" "/adminlogin.php" "//adminLogin.php" "/adminLogin.php" "//AdminMain.php" "//adminmember.php" "//adminpanel.php" "//adminpanel.php" "/adminpanel.php" "//admin.php" "//admin.php" "/admin.php" "//admins.php" "/admins.php" "//admintab.php" "//adminuserlogin.php" "//adminuser.php" "//adm_login.php" "//admloginuser.php" "/admloginuser.php" "//adm.php" "//adm.php" "/adm.php" "//adm_user.php" "//ad.php" "//adsystem/index.php" "//affiliate.php" "/affiliate.php" "//a_main.php" "//article/admin/admin.php" "//article.php" "//art.php" "/authadmin.php" "/authenticate.php" "/authentication.php" "/auth.php" "/authuser.php" "/autologin.php" "//bb-admin/admin.php" "/bb-admin/admin.php" "//bb-admin/index.php" "/bb-admin/index.php" "//bb-admin/login.php" "/bb-admin/login.php" "/blog/wp-login.php" "/cgi-bin/loginphp" "/checkadmin.php" "/checklogin.php" "/check.php" "/checkuser.php" "/cmsadmin.php" "//controlpanel.php" "/controlpanel.php" "/control.php" "//cp.php" "/cp.php" "/fileadmin.php" "//home.php" "/home.php" "/isadmin.php" "/letmein.php" "/login1php" "/login_adminphp" "/login_outphp" "/loginphp" "//login.php" "/log_in.php" "/log-in.php" "/login.php" "/login.php" "/loginsuperphp" "/login_userphp" "/logoutphp" "/manage/index.php" "/management.php" "/manage.php" "/manager/index.php" "/manager.php" "//memberadmin.php" "/memberadmin.php" "/member.php" "/members.php" "/mn-admin/index.php" "//modelsearch/admin.php" "/modelsearch/admin.php" "//modelsearch/index.php" "/modelsearch/index.php" "//modelsearch/login.php" "/modelsearch/login.php" "//moderator/admin.php" "/moderator/admin.php" "//moderator/login.php" "/moderator/login.php" "//moderator.php" "/moderator.php" "//nsw/admin/login.php" "/nsw/admin/login.php" "//pages/admin/admin-login.php" "/pages/admin/admin-login.php" "//panel-administracion/admin.php" "/panel-administracion/admin.php" "//panel-administracion/index.php" "/panel-administracion/index.php" "//panel-administracion/login.php" "/panel-administracion/login.php" "/panel.php" "/personeel/index.php" "/personeel/login.php" "/phpishere" "/phpldapadmin/" "/phpmyadmin/" "//phpMyAdmin/" "/phppgadmin/" "/phpSQLiteAdmin/" "/processlogin.php" "//rcjakar/admin/login.php" "/rcjakar/admin/login.php" "/relogin.php" "/Server.php" "/sign_in.php" "/sign-in.php" "/signin.php" "//siteadmin/index.php" "/siteadmin/index.php" "//siteadmin/login.php" "/siteadmin/login.php" "/siteadmin.php" "/staff/index.php" "/staff/login.php" "/staff/member.php" "/staff/members.php" "/super1php" "/super_indexphp" "/super_loginphp" "/supermanagerphp" "/supermanphp" "/superphp" "/superuserphp" "/superuser.php" "/supervise/Loginphp" "/sysadmin.php" "/sysadm.php" "/ur-admin.php" "/user/admin.php" "/useradmin.php" "/userlogin.php" "//user.php" "/user.php" "/users/admin.php" "/users.php" "//usuarios/login.php" "/usuarios/login.php" "/usuarioslogin.php" "/vorod.php" "/vorud.php" "//webadmin/admin.php" "/webadmin/admin.php" "//webadmin/index.php" "/webadmin/index.php" "//webadmin/login.php" "/webadmin/login.php" "//webadmin.php" "/webadmin.php" "/webmaster.php" "//wp-login.php" "/wp-login.php" "//yonetici.php" "/yonetici.php" "//yonetim.php" "/yonetim.php" "//zkcf45/login.php" "//zkcf/login.php" "//z_shop_newshop.php")
declare -a asp=("//0admin/login.asp" "//0admin/login.aspx" "//0manager/admin.asp" "//0manager/admin.aspx" "//aaa.asp" "//aaa.aspx" "/acceso.asp" "/access.asp" "//account.asp" "/account.asp" "//account.aspx" "/accounts.asp" "//acct/login.asp" "//acct/login.aspx" "//ad_admin/admin_login.asp" "//ad_admin/admin_login.aspx" "//ad.asp" "//ad.aspx" "//add_admin.asp" "//add_admin.aspx" "//add.asp" "//add.aspx" "//addfile.asp" "//addfile.aspx" "//addlb.asp" "//addlb.aspx" "//addmember.asp" "//addmember.aspx" "//adduser.asp" "//adduser.aspx" "//ad_login.asp" "//ad_login.aspx" "//adm/admloginuser.asp" "/adm/admloginuser.asp" "//ad_manage.asp" "//ad_manage.aspx" "//adm.asp" "//adm.asp" "/adm.asp" "//adm.aspx" "//adm_auth.asp" "/adm_auth.asp" "/admin1.asp" "/admin2.asp" "//admin2/index.asp" "/admin2/index.asp" "//admin2/login.asp" "/admin2/login.asp" "/admin/account.asp" "//admin/admin.asp" "/admin/admin.asp" "//admin/admin_login.asp" "//admin/admin-login.asp" "/admin/admin_login.asp" "/admin/admin-login.asp" "//admin/adminLogin.asp" "/admin/adminLogin.asp" "//admin_area/admin.asp" "//adminarea/admin.asp" "/admin_area/admin.asp" "/adminarea/admin.asp" "/admin_area.asp" "//admin_area/index.asp" "//adminarea/index.asp" "/admin_area/index.asp" "/adminarea/index.asp" "//admin_area/login.asp" "//adminarea/login.asp" "/admin_area/login.asp" "/adminarea/login.asp" "//admin.asp" "//admin.asp" "/admin.asp" "//admin.aspx" "/admincontrol.asp" "//admincontrol/login.asp" "/admincontrol/login.asp" "/admin/controlpanel.asp" "/admin/cp.asp" "//admincp/index.asp" "/admincp/index.asp" "//admincp/login.asp" "/admincp/login.asp" "/admin/default.asp" "/admin/default.aspx" "//adm/index.asp" "/adm/index.asp" "/admin/home.asp" "/admin/index.asp" "/admin/index.asp" "/admin/index.aspx" "/administr8.asp" "/administration.asp" "/administrator/account.asp" "/administrator.asp" "/administrator/default.asp" "/administrator/default.aspx" "/administrator/index.asp" "/administrator/index.asp" "/administrator/index.aspx" "//administratorlogin.asp" "/administrator/login.asp" "/administratorlogin.asp" "/administrators.asp" "/adminitem.asp" "/adminitems.asp" "//admin_login.asp" "//admin-login.asp" "//adminlogin.asp" "/admin_login.asp" "/admin-login.asp" "/admin/login.asp" "/admin/login.asp" "/adminlogin.asp" "//adminLogin.asp" "/adminLogin.asp" "//adminlogin.aspx" "/admin/login.aspx" "//AdminMain.asp" "//AdminMain.aspx" "//adminmember.asp" "//adminmember.aspx" "//adminpanel.asp" "/adminpanel.asp" "//adminpanel.aspx" "//admins.asp" "/admins.asp" "//admins.aspx" "//admintab.asp" "//admintab.aspx" "//adminuser.asp" "//adminuser.aspx" "//adminuserlogin.asp" "//adminuserlogin.aspx" "//adm_login.asp" "//adm_login.aspx" "//admloginuser.asp" "/admloginuser.asp" "//adm_user.asp" "//adm_user.aspx" "//adsystem/index.asp" "//adsystem/index.aspx" "//affiliate.asp" "/affiliate.asp" "//a_main.asp" "//a_main.aspx" "//art.asp" "//art.aspx" "//article/admin/admin.asp" "//article/admin/admin.aspx" "//article.asp" "//article.aspx" "/asp" "/aspishere" "/authadmin.asp" "/auth.asp" "/authenticate.asp" "/authentication.asp" "/authuser.asp" "/autologin.asp" "//bb-admin/admin.asp" "/bb-admin/admin.asp" "//bb-admin/index.asp" "/bb-admin/index.asp" "//bb-admin/login.asp" "/bb-admin/login.asp" "/blog/wp-login.asp" "/cgi-bin/loginasp" "/checkadmin.asp" "/check.asp" "/checklogin.asp" "/checkuser.asp" "/cmsadmin.asp" "/control.asp" "/controlpanel.asp" "/cp.asp" "/fileadmin.asp" "//home.asp" "/home.asp" "/isadmin.asp" "/letmein.asp" "/login1asp" "/login_adminasp" "/loginasp" "/log_in.asp" "/log-in.asp" "/login.asp" "/login.asp" "/login.aspx" "/login_outasp" "/loginsuperasp" "/login_userasp" "/logoutasp" "/manage.asp" "/management.asp" "/manager.asp" "//memberadmin.asp" "/memberadmin.asp" "/member.asp" "/members.asp" "/mn-admin/index.asp" "/mn-admin/index.aspx" "//modelsearch/admin.asp" "/modelsearch/admin.asp" "//modelsearch/index.asp" "/modelsearch/index.asp" "/modelsearch/login.asp" "/moderator/admin.asp" "/moderator.asp" "/moderator/login.asp" "//pages/admin/admin-login.asp" "/pages/admin/admin-login.asp" "//panel-administracion/admin.asp" "/panel-administracion/admin.asp" "//panel-administracion/index.asp" "/panel-administracion/index.asp" "//panel-administracion/login.asp" "/panel-administracion/login.asp" "/panel.asp" "/processlogin.asp" "/relogin.asp" "/Server.asp" "/sign_in.asp" "/sign-in.asp" "/signin.asp" "/siteadmin.asp" "//siteadmin/index.asp" "/siteadmin/index.asp" "//siteadmin/login.asp" "/siteadmin/login.asp" "/super1asp" "/superasp" "/super_indexasp" "/super_loginasp" "/supermanagerasp" "/supermanasp" "/superuserasp" "/superuser.asp" "/supervise/Loginasp" "/sysadm.asp" "/sysadmin.asp" "/ur-admin.asp" "/user/admin.asp" "//user.asp" "/user.asp" "/userlogin.asp" "/users/admin.asp" "/users.asp" "/vorod.asp" "/vorud.asp" "//webadmin/admin.asp" "/webadmin/admin.asp" "/webadmin.asp" "//webadmin/index.asp" "/webadmin/index.asp" "//webadmin/login.asp" "/webadmin/login.asp" "/webmaster.asp" "//yonetici.asp" "/yonetici.asp" "//yonetici.aspx" "//yonetim.asp" "/yonetim.asp" "//yonetim.aspx" "//zkcf45/login.asp" "//zkcf45/login.aspx" "//zkcf/login.asp" "//zkcf/login.aspx" "//z_shop_newshop.asp" "//z_shop_newshop.aspx")
declare -a jsp=("/acceso.js" "/acceso.jsp" "/access.js" "/access.jsp" "/account.js" "/account.jsp" "/accounts.js" "/accounts.jsp" "/adm/admloginuser.js" "/adm/admloginuser.jsp" "/adm_auth.js" "/adm_auth.jsp" "/admin1.js" "/admin1.jsp" "/admin2/index.js" "/admin2/index.jsp" "/admin2.js" "/admin2.jsp" "/admin2/login.js" "/admin2/login.jsp" "/admin/account.js" "/admin/account.jsp" "/admin/admin.js" "/admin/admin.jsp" "/admin/admin_login.js" "/admin/admin-login.js" "/admin/adminLogin.js" "/admin/admin_login.jsp" "/admin/admin-login.jsp" "/admin/adminLogin.jsp" "/admin_area/admin.js" "/adminarea/admin.js" "/admin_area/admin.jsp" "/adminarea/admin.jsp" "/admin_area/index.js" "/adminarea/index.js" "/admin_area/index.jsp" "/adminarea/index.jsp" "/admin_area.js" "/admin_area.jsp" "/admin_area/login.js" "/adminarea/login.js" "/admin_area/login.jsp" "/adminarea/login.jsp" "/admincontrol.js" "/admincontrol.jsp" "/admincontrol/login.js" "/admincontrol/login.jsp" "/admin/controlpanel.js" "/admin/controlpanel.jsp" "/admin/cp.js" "/admin/cp.jsp" "/admincp/login.js" "/admincp/login.jsp" "/adm/index.js" "/adm/index.jsp" "/admin/home.js" "/admin/home.jsp" "/admin/index.js" "/admin/index.jsp" "/administr8.js" "/administr8.jsp" "/administration.js" "/administration.jsp" "/administrator/account.js" "/administrator/account.jsp" "/administrator/index.js" "/administrator/index.jsp" "/administrator.js" "/administrator.jsp" "/administrator/login.js" "/administratorlogin.js" "/administrator/login.jsp" "/administratorlogin.jsp" "/administrators.js" "/administrators.jsp" "/adminitem.js" "/adminitem.jsp" "/adminitems.js" "/adminitems.jsp" "/admin.js" "/admin.jsp" "/admin_login.js" "/admin-login.js" "/admin/login.js" "/adminlogin.js" "/adminLogin.js" "/admin_login.jsp" "/admin-login.jsp" "/admin/login.jsp" "/adminlogin.jsp" "/adminLogin.jsp" "/adminpanel.js" "/adminpanel.jsp" "/admins.js" "/admins.jsp" "/adm.js" "/adm.jsp" "/admloginuser.js" "/admloginuser.jsp" "/affiliate.js" "/affiliate.jsp" "/authadmin.js" "/authadmin.jsp" "/authenticate.js" "/authenticate.jsp" "/authentication.js" "/authentication.jsp" "/auth.js" "/auth.jsp" "/authuser.js" "/authuser.jsp" "/autologin.js" "/autologin.jsp" "/bb-admin/admin.js" "/bb-admin/admin.jsp" "/bb-admin/index.js" "/bb-admin/index.jsp" "/bb-admin/login.js" "/bb-admin/login.jsp" "/blog/wp-login.js" "/blog/wp-login.jsp" "/cgi-bin/loginjs" "/cgi-bin/loginjsp" "/checkadmin.js" "/checkadmin.jsp" "/check.js" "/check.jsp" "/checklogin.js" "/checklogin.jsp" "/checkuser.js" "/checkuser.jsp" "/cmsadmin.js" "/cmsadmin.jsp" "/control.js" "/control.jsp" "/controlpanel.js" "/controlpanel.jsp" "/cp.js" "/cp.jsp" "/fileadmin.js" "/fileadmin.jsp" "/home.js" "/home.jsp" "/isadmin.js" "/isadmin.jsp" "/jspishere" "/letmein.js" "/letmein.jsp" "/login1js" "/login1jsp" "/login_adminjs" "/login_adminjsp" "/loginjs" "/log_in.js" "/log-in.js" "/login.js" "/loginjsp" "/log_in.jsp" "/log-in.jsp" "/login.jsp" "/login_outjs" "/login_outjsp" "/loginsuperjs" "/loginsuperjsp" "/login_userjs" "/login_userjsp" "/logoutjs" "/logoutjsp" "/manage.js" "/manage.jsp" "/management.js" "/management.jsp" "/manager.js" "/manager.jsp" "/memberadmin.js" "/memberadmin.jsp" "/member.js" "/member.jsp" "/members.js" "/members.jsp" "/modelsearch/admin.js" "/modelsearch/admin.jsp" "/modelsearch/index.js" "/modelsearch/index.jsp" "/modelsearch/login.js" "/modelsearch/login.jsp" "/moderator/admin.js" "/moderator/admin.jsp" "/moderator.js" "/moderator.jsp" "/moderator/login.js" "/moderator/login.jsp" "/nsw/admin/login.js" "/nsw/admin/login.jsp" "/pages/admin/admin-login.js" "/pages/admin/admin-login.jsp" "/panel-administracion/admin.js" "/panel-administracion/admin.jsp" "/panel-administracion/index.js" "/panel-administracion/index.jsp" "/panel-administracion/login.js" "/panel-administracion/login.jsp" "/panel.js" "/panel.jsp" "/processlogin.js" "/processlogin.jsp" "/rcjakar/admin/login.js" "/rcjakar/admin/login.jsp" "/relogin.js" "/relogin.jsp" "/Server.js" "/Server.jsp" "/sign_in.js" "/sign-in.js" "/signin.js" "/sign_in.jsp" "/sign-in.jsp" "/signin.jsp" "/siteadmin/index.js" "/siteadmin/index.jsp" "/siteadmin.js" "/siteadmin.jsp" "/siteadmin/login.js" "/siteadmin/login.jsp" "/super1js" "/super1jsp" "/super_indexjs" "/super_indexjsp" "/superjs" "/superjsp" "/super_loginjs" "/super_loginjsp" "/supermanagerjs" "/supermanagerjsp" "/supermanjs" "/supermanjsp" "/superuserjs" "/superuser.js" "/superuserjsp" "/superuser.jsp" "/supervise/Loginjs" "/supervise/Loginjsp" "/sysadmin.js" "/sysadmin.jsp" "/sysadm.js" "/sysadm.jsp" "/ur-admin.js" "/ur-admin.jsp" "/user/admin.js" "/user/admin.jsp" "/user.js" "/user.jsp" "/userlogin.js" "/userlogin.jsp" "/users/admin.js" "/users/admin.jsp" "/users.js" "/users.jsp" "/usuarios/login.js" "/usuarios/login.jsp" "/usuarioslogin.jsp" "/vorod.js" "/vorod.jsp" "/vorud.js" "/vorud.jsp" "/webadmin/admin.js" "/webadmin/admin.jsp" "/webadmin/index.js" "/webadmin/index.jsp" "/webadmin.js" "/webadmin.jsp" "/webadmin/login.js" "/webadmin/login.jsp" "/webmaster.js" "/webmaster.jsp" "/wp-login.js" "/wp-login.jsp" "/yonetici.js" "/yonetici.jsp" "/yonetim.js" "/yonetim.jsp")
declare -a htmlad=("//account.html"  "//account.html"  "/account.html"  "//adm.html"  "/adm.html"  "/admin1.htm"  "/admin1.html"  "/admin2.html"  "//admin/account.html"  "/admin/account.html"  "//admin/admin.html"  "/admin/admin.html"  "/admin/adminLogin.htm"  "//admin/admin_login.html"  "//admin/admin-login.html"  "/admin/admin_login.html"  "/admin/admin-login.html"  "//admin/adminLogin.html"  "/admin/adminLogin.html"  "//admin_area/admin.html"  "//adminarea/admin.html"  "/admin_area/admin.html"  "/adminarea/admin.html"  "//admin_area/index.html"  "//adminarea/index.html"  "/admin_area/index.html"  "/adminarea/index.html"  "//admin_area/login.html"  "//adminarea/login.html"  "/admin_area/login.html"  "/adminarea/login.html"  "//admincontrol.html"  "/admincontrol.html"  "//admincontrol/login.html"  "/admincontrol/login.html"  "/admin/controlpanel.htm"  "//admin/controlpanel.html"  "/admin/controlpanel.html"  "//admin/cp.html"  "/admin/cp.html"  "//admincp/index.html"  "/admincp/index.html"  "//adm/index.html"  "/adm/index.html"  "//admin/home.html"  "/admin/home.html"  "/admin.htm"  "//admin.html"  "/admin.html"  "//admin/index.html"  "/admin/index.html"  "/administr8.html"  "/administration.html"  "//administrator/account.html"  "/administrator/account.html"  "//administrator.html"  "/administrator.html"  "//administrator/index.html"  "/administrator/index.html"  "//administrator/login.html"  "/administrator/login.html"  "/admin/login.htm"  "//admin_login.html"  "//admin-login.html"  "//admin/login.html"  "/admin_login.html"  "/admin-login.html"  "/admin/login.html"  "//adminLogin.html"  "/adminLogin.html"  "//adminpanel.html"  "//adminpanel.html"  "/adminpanel.html"  "//admins.html"  "/admins.html"  "//bb-admin/admin.html"  "/bb-admin/admin.html"  "//bb-admin/index.html"  "/bb-admin/index.html"  "//bb-admin/login.html"  "/bb-admin/login.html"  "//controlpanel.html"  "/controlpanel.html"  "//cp.html"  "/cp.html"  "/fileadmin.html"  "//home.html"  "/home.html"  "/html"  "/login.htm"  "//login.html"  "/login.html"  "//modelsearch/admin.html"  "/modelsearch/admin.html"  "//modelsearch/index.html"  "/modelsearch/index.html"  "//modelsearch/login.html"  "/modelsearch/login.html"  "//moderator/admin.html"  "/moderator/admin.html"  "//moderator.html"  "/moderator.html"  "//moderator/login.html"  "/moderator/login.html"  "//pages/admin/admin-login.html"  "/pages/admin/admin-login.html"  "//panel-administracion/admin.html"  "/panel-administracion/admin.html"  "//panel-administracion/index.html"  "/panel-administracion/index.html"  "//panel-administracion/login.html"  "/panel-administracion/login.html"  "/relogin.htm"  "/relogin.html"  "/Server.html"  "//siteadmin/login.html"  "/siteadmin/login.html"  "/sysadmin.html"  "/ur-admin.html"  "//user.html"  "/user.html"  "//webadmin/admin.html"  "/webadmin/admin.html"  "//webadmin.html"  "/webadmin.html"  "//webadmin/index.html"  "/webadmin/index.html"  "//webadmin/login.html"  "/webadmin/login.html"  "//yonetici.html"  "/yonetici.html"  "//yonetim.html"  "/yonetim.html")
declare -a others=("/0admin/" "/0manager/" "//aadmin/" "/aadmin/" "//abc/" "//about/" "//abroad/" "/acceso.brf" "/acceso.cfm" "/acceso.cgi" "/access/" "/access.brf" "/access.cgi" "//access/sf2.mdb" "//account" "/account/" "/account.brf" "/account.cfm" "//accounts" "/accounts/" "/accounts.brf" "/accounts.cgi" "//acct_login/" "/acct_login/" "//ad/" "//add" "//add_admin" "//addmember" "//address" "//add_user" "//adduser" "//ad/img" "//ad_login" "//adlogin" "//adm" "//adm/" "//adm/" "/adm/" "/adm/admloginuser.brf" "/adm/admloginuser.cfm" "//ad_manage" "//admanage" "/adm_auth.brf" "/adm_auth.cfm" "/adm_auth.cgi" "/adm.brf" "/adm.cfm" "/adm.cgi" "//admin" "//admin/" "/admin/" "//admin1/" "/admin1/" "/admin1.brf" "/admin1.cgi" "//admin2/" "/admin2/" "/admin2.brf" "/admin2.cfm" "/admin2.cgi" "/admin2/index.brf" "/admin2/index.cfm" "/admin2/login.brf" "/admin2/login.cfm" "//admin3/" "/admin3/" "//admin4/" "/admin4/" "/admin4_account/" "/admin4_colon/" "//admin5/" "/admin5/" "/admin/account.brf" "/admin/account.cfm" "/admin/account.cgi" "/admin/admin.brf" "/admin/admin.cfm" "/admin/admin.cgi" "/admin/admin_login.brf" "/admin/admin-login.brf" "/admin/adminLogin.brf" "/admin/admin_login.cfm" "/admin/admin-login.cfm" "/admin/adminLogin.cfm" "/admin/admin_login.cgi" "/admin/admin-login.cgi" "/admin/adminLogin.cgi" "//admin_area/" "//adminarea/" "/admin_area/" "/adminarea/" "/admin_area/admin.brf" "/adminarea/admin.brf" "/admin_area/admin.cfm" "/adminarea/admin.cfm" "/admin_area/admin.cgi" "/admin_area.brf" "/admin_area.cgi" "/admin_area/index.brf" "/adminarea/index.brf" "/admin_area/index.cfm" "/adminarea/index.cfm" "/admin_area/login.brf" "/adminarea/login.brf" "/admin_area/login.cfm" "/adminarea/login.cfm" "/admin_area/login.cgi" "/admin.brf" "/admin.cfm" "/admin.cgi" "/admincontrol/" "/admincontrol." "/admincontrol.brf" "/admincontrol.cfm" "/admincontrol.cgi" "/admincontrol/login.brf" "/admincontrol/login.cfm" "/admin/controlpanel.brf" "/admin/controlpanel.cfm" "/admin/controlpanel.cgi" "/admincp/" "/admin/cp.brf" "/admin/cp.cfm" "/admin/cp.cgi" "/admincp/login.brf" "/admincp/login.cgi" "/adm/index.brf" "/adm/index.cfm" "/admin/home.brf" "/admin/home.cfm" "/admin/home.cgi" "/admini/" "/admin/index.brf" "/admin/index.cfm" "/administer/" "/administr8/" "/administr8.brf" "/administr8.cgi" "/administratie/" "/administration/" "/administration.brf" "/administration.cgi" "//administrator/" "/administrator/" "/administrator/account.brf" "/administrator/account.cfm" "/administrator/account.cgi" "/administratoraccounts/" "/administrator.brf" "/administrator.cfm" "/administrator.cgi" "/administrator/index.brf" "/administrator/index.cfm" "//administratorlogin/" "/administratorlogin/" "/administrator/login.brf" "/administratorlogin.brf" "/administrator/login.cfm" "/administratorlogin.cfm" "/administrator/login.cgi" "/administratorlogin.cgi" "/administrators/" "/administrators.brf" "/administrators.cgi" "/administrivia/" "/adminitem/" "/adminitem.brf" "/adminitem.cgi" "/adminitems/" "/adminitems.brf" "/adminitems.cgi" "//adminlogin/" "/admin/login." "//adminLogin/" "/adminLogin/" "/admin_login.brf" "/admin-login.brf" "/admin/login.brf" "/adminlogin.brf" "/adminLogin.brf" "/admin_login.cfm" "/admin-login.cfm" "/admin/login.cfm" "/adminLogin.cfm" "/admin_login.cgi" "/admin-login.cgi" "/admin/login.cgi" "/adminlogin.cgi" "//adminmember" "/adminpanel/" "/adminpanel.brf" "/adminpanel.cfm" "/adminpanel.cgi" "//adminpro/" "/adminpro/" "//admins/" "/admins/" "/admins.brf" "/admins.cgi" "/adminsite/" "//admintab" "//AdminTools/" "/AdminTools/" "//adminuser" "/admin_user/" "/adminuser/" "//adminuserlogin" "/admin_users/" "/adminusers/" "//adm_login" "/admloginuser.brf" "/admloginuser.cfm" "//adoconn" "//ads" "//adsl" "//adver" "/affiliate.brf" "/affiliate.cfm" "/affiliate.cgi" "//aggress" "//al" "//algol/archive" "//amateur" "//amateurs" "//amd" "//and" "//angel" "//ani" "//ani1" "//anime" "//app" "//apps" "//appz" "//arc" "//archiv" "//archive" "//archives" "//are" "//art" "//Article" "//article/admin" "//articleadmin" "//Article_Show" "//asian" "//asians" "/authadmin.brf" "/authadmin.cgi" "/auth.brf" "/auth.cgi" "/authenticate.brf" "/authenticate.cgi" "/authentication.brf" "/authentication.cgi" "/authuser.brf" "/authuser.cgi" "/autologin/" "/autologin.brf" "/autologin.cgi" "/banneradmin/" "//bb-admin/" "/bb-admin/" "/bbadmin/" "/bb-admin/admin.brf" "/bb-admin/admin.cfm" "/bb-admin/admin.cgi" "/bb-admin/index.brf" "/bb-admin/index.cfm" "/bb-admin/login.brf" "/bb-admin/login.cfm" "/bb-admin/login.cgi" "/beheer/" "/bestuur/" "/bigadmin/" "/blogindex/" "/blog/wp-admin/" "/blog/wp-login.brf" "/blog/wp-login.cgi" "/cadmins/" "/ccp14admin/" "/cgi-bin/loginasp" "/cgi-bin/loginbrf" "/cgi-bin/logincgi" "/cgi-bin/loginjs" "/cgi-bin/loginjsp" "/cgi-bin/loginphp" "/checkadmin.brf" "/checkadmin.cgi" "/check.brf" "/check.cgi" "/checklogin.brf" "/checklogin.cgi" "/checkuser.brf" "/checkuser.cgi" "/cms/" "/cmsadmin/" "/cmsadmin.brf" "/cmsadmin.cgi" "/control/" "/control.brf" "/control.cgi" "/controlemanager/" "/controlpanel/" "/controlpanel.brf" "/controlpanel.cfm" "/controlpanel.cgi" "/cp/" "/cpanel/" "/cpanel_file/" "/cp.brf" "/cp.cfm" "/cp.cgi" "/customer_login/" "/database_administration/" "/Database_Administration/" "/directadmin/" "/dir-login/" "/ezsqliteadmin/" "/fileadmin/" "/fileadmin.brf" "/fileadmin.cgi" "/formslogin/" "/globes_admin/" "/home.brf" "/home.cfm" "/hpwebjetadmin/" "/Indy_admin/" "//instadmin/" "/instadmin/" "/intranet/" "/intronet/" "/irc-macadmin/" "/isadmin.brf" "/isadmin.cgi" "/joomla/administrator" "/kpanel/" "/letmein/" "/letmein/" "/letmein.brf" "/letmein.cgi" "/LiveUser_Admin/" "/log_in/" "/log-in/" "/login/" "/login/" "/login1/" "/login1asp" "/login1brf" "/login1cgi" "/login1js" "/login1jsp" "/login1php" "/login_admin/" "/login_adminasp" "/login_adminbrf" "/login_admincgi" "/login_adminjs" "/login_adminjsp" "/login_adminphp" "/loginasp" "/loginbrf" "/log_in.brf" "/log-in.brf" "/login.brf" "/login.cfm" "/logincgi" "/log_in.cgi" "/log-in.cgi" "/login.cgi" "/login_db/" "/loginerror/" "/loginflat/" "/loginjs" "/loginjsp" "/loginok/" "/login_out/" "/login_outasp" "/login_outbrf" "/login_outcgi" "/login_outjs" "/login_outjsp" "/login_outphp" "/loginphp" "/login-redirect/" "/loginsave/" "/loginsuper/" "/loginsuperasp" "/loginsuperbrf" "/loginsupercgi" "/loginsuperjs" "/loginsuperjsp" "/loginsuperphp" "/login-us/" "/login_userasp" "/login_userbrf" "/login_usercgi" "/login_userjs" "/login_userjsp" "/login_userphp" "/logo_sysadmin/" "/logout/" "/logoutasp" "/logoutbrf" "/logoutcgi" "/logoutjs" "/logoutjsp" "/logoutphp" "/Lotus_Domino_Admin/" "/macadmin/" "/manage/" "/manage.brf" "/manage.cgi" "/management/" "/management/" "/management.brf" "/management.cgi" "/manager/" "/manager/" "/manager.brf" "/manager.cgi" "/manuallogin/" "/member/" "//memberadmin/" "/memberadmin/" "/memberadmin.brf" "/memberadmin.cfm" "/memberadmin.cgi" "/member.brf" "/member.cgi" "/members/" "/members.brf" "/members.cgi" "/memlogin/" "/meta_login/" "/modelsearch/admin.brf" "/modelsearch/admin.cfm" "/modelsearch/index.brf" "/modelsearch/index.cfm" "/modelsearch/login.brf" "/modelsearch/login.cfm" "/modelsearch/login.cgi" "//moderator/" "/moderator/" "/moderator/admin.brf" "/moderator/admin.cfm" "/moderator/admin.cgi" "/moderator.brf" "/moderator.cfm" "/moderator.cgi" "/moderator/login.brf" "/moderator/login.cfm" "/moderator/login.cgi" "/modules/admin/" "/myadmin/" "/navSiteAdmin/" "/newsadmin/" "/nsw/admin/login.brf" "/nsw/admin/login.cfm" "/openvpnadmin/" "/pages/admin/" "/pages/admin/admin-login.brf" "/pages/admin/admin-login.cfm" "/pages/admin/admin-login.cgi" "/panel/" "//panel-administracion/" "/panel-administracion/" "/panel-administracion/admin.brf" "/panel-administracion/admin.cfm" "/panel-administracion/index.brf" "/panel-administracion/index.cfm" "/panel-administracion/login.brf" "/panel-administracion/login.cfm" "/panel-administracion/login.cgi" "/panel.brf" "/panel.cgi" "/personeel/" "/pgadmin/" "/phpldapadmin/" "/phpmyadmin/" "//phpMyAdmin/" "/phppgadmin/" "/phpSQLiteAdmin/" "/platz_login/" "/power_user/" "/processlogin.brf" "/processlogin.cgi" "/project-admins/" "/PSUser/" "/pureadmin/" "/?q=admin" "/?q=user" "/radmind/" "/radmind-1/" "/rcjakar/admin/login.brf" "/rcjakar/admin/login.cfm" "/rcLogin/" "/registration/" "/relogin.brf" "/relogin.cgi" "/root/" "/secret/" "/secrets/" "/secure/" "/security/" "/security/" "/server/" "/Server/" "/ServerAdministrator/" "/server_admin_small/" "/Server.brf" "/Server.cgi" "/showlogin/" "/sign_in/" "/sign-in/" "/signin/" "/sign_in.brf" "/sign-in.brf" "/signin.brf" "/sign_in.cgi" "/sign-in.cgi" "/signin.cgi" "/simpleLogin/" "/siteadmin/" "/siteadmin.brf" "/siteadmin.cgi" "/siteadmin/index.brf" "/siteadmin/index.cfm" "/siteadmin/login.brf" "/siteadmin/login.cfm" "/smblogin/" "/sql-admin/" "/sshadmin/" "/ss_vms_admin_sm/" "/staff/" "/staradmin/" "/sub-login/" "/super1/" "/super1asp" "/super1brf" "/super1cgi" "/super1js" "/super1jsp" "/super1php" "/Super-Admin/" "/superasp" "/superbrf" "/supercgi" "/super_indexasp" "/super_indexbrf" "/super_indexcgi" "/super_indexjs" "/super_indexjsp" "/super_indexphp" "/superjs" "/superjsp" "/super_loginasp" "/super_loginbrf" "/super_logincgi" "/super_loginjs" "/super_loginjsp" "/super_loginphp" "/superman/" "/supermanagerasp" "/supermanagerbrf" "/supermanagercgi" "/supermanagerjs" "/supermanagerjsp" "/supermanagerphp" "/supermanasp" "/supermanbrf" "/supermancgi" "/supermanjs" "/supermanjsp" "/supermanphp" "/superphp" "/superuser/" "/superuserasp" "/superuserbrf" "/superuser.brf" "/superusercgi" "/superuser.cgi" "/superuserjs" "/superuserjsp" "/superuserphp" "/supervise/" "/supervise/Loginasp" "/supervise/Loginbrf" "/supervise/Logincgi" "/supervise/Loginjs" "/supervise/Loginjsp" "/supervise/Loginphp" "/supervisor/" "/support_login/" "/sysadm/" "/sysadm.brf" "/sysadm.cgi" "/sys-admin/" "/sysadmin/" "/SysAdmin/" "/SysAdmin2/" "/sysadmin.brf" "/sysadmin.cgi" "/sysadmins/" "/system_administration/" "/system-administration/" "/typo3/" "/ur-admin/" "/ur-admin.brf" "/ur-admin.cgi" "/user/" "/useradmin/" "/user/admin.brf" "/user/admin.cgi" "/user.brf" "/user.cfm" "/user.cgi" "/UserLogin/" "/userlogin.brf" "/userlogin.cgi" "/users/" "/users/admin.brf" "/users/admin.cgi" "/users.brf" "/users.cgi" "/usr/" "//usuario/" "/usuario/" "//usuarios/" "/usuarios/" "/usuarios/login.brf" "/usuarios/login.cfm" "/usuarioslogin.cfm" "/utility_login/" "/uvpanel/" "/vadmind/" "/vmailadmin/" "/vorod/" "/vorod.brf" "/vorod.cgi" "/vorud/" "/vorud.brf" "/vorud.cgi" "//webadmin/" "/webadmin/" "/WebAdmin/" "/webadmin/admin.brf" "/webadmin/admin.cfm" "/webadmin.brf" "/webadmin.cfm" "/webadmin.cgi" "/webadmin/index.brf" "/webadmin/index.cfm" "/webadmin/login.brfbrf" "/webadmin/login.cfm" "/web-beheerder/" "/webbeheerder/" "/web-master/" "/webmaster/" "/webmaster.brf" "/webmaster.cgi" "/welcome/" "/wizmysqladmin/" "/wp-admin" "/wp-admin/" "/wp-login/" "/wp-login.brf" "/wp-login.cfm" "//xbbs" "//xiazai" "//xlogin/" "/xlogin/" "//xml" "//xtadmin/" "//xzsysadmin/" "//y" "//ybadmin/" "//yinyue" "/yonetici.brf" "/yonetici.cgi" "/yonetim.brf" "/yonetim.cgi" "//youxi" "//z" "//zip" "//zips" "//ztqdata.mdb" "//zt/ztpdata.mdb")
Logfile="output.txt"

usage=""$0" -u www.site.com -t 1 -o output.txt

where:
    -h  show this help text
    -u  set the seed value (default: 42)
    -t  Site Language(1.php,2.asp,3.html,4.jsp,5.other)
    -o  Choose output name file(Default is output.txt)"

while getopts ":hu:t:o:" opt; do
  case "$opt" in
    h) echo "$usage"
       exit
         ;;
    u) surl=$OPTARG
	 ;;
    t) type=$OPTARG
         ;;
    o) Logfile=$OPTARG
         ;;
   \?) printf "illegal option: -%s\n" "$OPTARG"
       echo "$usage"
       exit 1
        ;;

  esac
done
shift $(( OPTIND - 1 ))

green='\e[1;32m'
NC='\e[0m' # No Color
red='\e[1;31m'

case "$type" in
"1")
    for i in "${php[@]}"
do
    status=$(curl -s --head -w %{http_code} $surl$i -o /dev/null)
	if [[ $status == 200 ]]
	then
            echo -e "${green}<Y>\t$surl$i${NC}"
	    echo $surl$i >> $Logfile
	else
	    echo -e "${red}<N>\t$surl$i${NC}"
	fi
done
exit 1
    ;;
"2")
    for i in "${asp[@]}"
do
    status=$(curl -s --head -w %{http_code} $surl$i -o /dev/null)
	if [[ $status == 200 ]]
	then
            echo -e "${green}<Y>\t$surl$i${NC}"
	    echo $surl$i >> $Logfile
	else
	    echo -e "${red}<N>\t$surl$i${NC}"
	fi
done
exit 1
    ;;
"3")
    for i in "${jsp[@]}"
do
    status=$(curl -s --head -w %{http_code} $surl$i -o /dev/null)
	if [[ $status == 200 ]]
	then
            echo -e "${green}<Y>\t$surl$i${NC}"
	    echo $surl$i >> $Logfile
	else
	    echo -e "${red}<N>\t$surl$i${NC}"
	fi
done
exit 1
    ;;
"4")
    for i in "${htmlad[@]}"
do
    status=$(curl -s --head -w %{http_code} $surl$i -o /dev/null)
	if [[ $status == 200 ]]
	then
            echo -e "${green}<Y>\t$surl$i${NC}"
	    echo $surl$i >> $Logfile
	else
	    echo -e "${red}<N>\t$surl$i${NC}"
	fi
done
exit 1
    ;;
"5")
    for i in "${others[@]}"
do
    status=$(curl -s --head -w %{http_code} $surl$i -o /dev/null)
	if [[ $status == 200 ]]
	then
            echo -e "${green}<Y>\t$surl$i${NC}"
	    echo $surl$i >> $Logfile
	else
	    echo -e "${red}<N>\t$surl$i${NC}"
	fi
done
exit 1
    ;;
*)
    echo "For More Information type -h"
    exit 1
    ;;
esac

error: pathspec 'AdminPageFinder-CLI.sh' did not match any file(s) known to git


Add an "executable tutorial" going from zero to tracy on android (#3664)

* Add an "executable tutorial" going from zero to tracy on android
benchmark.

The idea is that a beginner would run it a few times, then it'd be
mostly useful as a tutorial to read steps from, not intended to be used
long term as a black box tool.

Just try running it. It'll complain a bit that you need to define
environment variables IREE_ROOT and ANDROID_NDK, and once you do that,
it should figure all the rest, including building tracy UI, going
through the whole steps of compiling an android benchmark workload,
running that in tracy, setting up port forwarding, and finally telling
you to run a command to run your (newly built) tracy UI to connect
and show the trace.

#!/bin/bash

# This script assumes Debian Linux. It could easily be modified to run on any Unix,
# as the Debian assumption is only to automatically install some packages,
# (Tracy dependencies). With a bit more work it could be made to support other OSes
# such as Windows, but that's not at all handled yet.

function print_status {
  echo -e "\e[96m$@\e[39m"
}

# Environment variables. They can be set manually, or will use the following defaults.
# IREE_ROOT and ANDROID_NDK are empty by default, must be defined by the user.
#
# To make this script very easy to play with, this script will also default to
# benchmarking a specific NN model (currently MobileBert encoder), and will take
# care of generating its input MLIR form and of setting the right --function_inputs
# and --entry_function for it. To use this script on any other specific NN model,
# define the following environment variables:
# IREE_INPUT_MLIR
# FUNCTION_INPUTS
# ENTRY_FUNCTION

DEFAULT_IREE_INPUT_MLIR="/tmp/iree/modules/MobileBertSquad/iree_input.mlir"

: ${IREE_ROOT:=""}
: ${IREE_BUILD_ANDROID:="$HOME/iree-build-android"}
: ${TRACY_ROOT:="$HOME/tracy"}
: ${PYTHON_BIN:=python3}
: ${CC:=clang}
: ${CXX:=clang++}
: ${IREE_INPUT_MLIR:="${DEFAULT_IREE_INPUT_MLIR}"}
: ${ANDROID_NDK:=""}
: ${IREE_LLVMAOT_LINKER_PATH:="$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++ -static-libstdc++ -O3"}
: ${FUNCTION_INPUTS:=""}
: ${ENTRY_FUNCTION:=""}
# Validation of the environment variables.

if [ -z "${IREE_ROOT}" ]
then
  print_status "Please define IREE_ROOT to point to your IREE git clone."
  print_status "Example:"
  print_status "  IREE_ROOT=\$HOME/iree $0"
  exit 1
fi

if [ ! -f "${IREE_ROOT}/iree/base/CMakeLists.txt" ]
then
  print_status "FATAL: bad IREE_ROOT (${IREE_ROOT})."
  exit 1
fi

if [ -z "${ANDROID_NDK}" ]
then
  print_status "Please define ANDROID_NDK to point to your Android NDK."
  print_status "Example:"
  print_status "  ANDROID_NDK=\$HOME/android-ndk-r21d $0"
  exit 1
fi

if [ ! -d "${ANDROID_NDK}/toolchains/llvm" ]
then
  print_status "FATAL: bad ANDROID_NDK (${ANDROID_NDK})."
  exit 1
fi

if ! $CC --version 1>/dev/null 2>/dev/null
then
  print_status "FATAL: Install $CC and set CC to it."
  exit 1
fi

if ! $CXX --version 1>/dev/null 2>/dev/null
then
  print_status "FATAL: Install $CXX and set CXX to it."
  exit 1
fi

if ! $IREE_LLVMAOT_LINKER_PATH --version 1>/dev/null 2>/dev/null
then
  print_status "Bad IREE_LLVMAOT_LINKER_PATH (${IREE_LLVMAOT_LINKER_PATH}). Rerun with it correctly set."
  exit 1
fi

# If we're playing with the default input MLIR, preset some reasonable
# FUNCTION_INPUTS and ENTRY_FUNCTION if they haven't been set.
# Otherwise, they must be provided.
if [[ -z "${FUNCTION_INPUTS}" || -z "${ENTRY_FUNCTION}" ]]
then
  if [[ "${IREE_INPUT_MLIR}" == "${DEFAULT_IREE_INPUT_MLIR}" ]]
  then
    FUNCTION_INPUTS="1x384xi32,1x384xi32,1x384xi32"
    ENTRY_FUNCTION="serving_default"
  else
    print_status "Please specify FUNCTION_INPUTS and ENTRY_FUNCTION appropriately for your IREE_INPUT_MLIR (${IREE_INPUT_MLIR})"
  fi
fi

print_status "Running with the following environment variables:"
print_status "ANDROID_NDK=${ANDROID_NDK}"
print_status "IREE_LLVMAOT_LINKER_PATH=${IREE_LLVMAOT_LINKER_PATH}"
print_status "IREE_ROOT=${IREE_ROOT}"
print_status "IREE_BUILD_ANDROID=${IREE_BUILD_ANDROID}"
print_status "TRACY_ROOT=${TRACY_ROOT}"
print_status "PYTHON_BIN=${PYTHON_BIN}"
print_status "CC=${CC}"
print_status "CXX=${CXX}"
print_status "IREE_INPUT_MLIR=${IREE_INPUT_MLIR}"
print_status "FUNCTION_INPUTS=${FUNCTION_INPUTS}"
print_status "ENTRY_FUNCTION=${ENTRY_FUNCTION}"

echo

print_status "Ensuring that we have Tracy source code..."
if [ ! -d ${TRACY_ROOT}/profiler/build/unix/ ]
then
  print_status "Tracy not found at ${TRACY_ROOT}. Either set TRACY_ROOT, or we're going to clone the git repository now."
  read -p "Press the return key..."
  git clone https://github.com/wolfpld/tracy "${TRACY_ROOT}"
fi

echo

print_status "Ensuring that the Tracy profiler is built..."
if [ ! -x "${TRACY_ROOT}/profiler/build/unix/Tracy-release" ]
then
  print_status "Checking Tracy dependencies - assuming Debian."
  TRACY_DEPS="libcapstone-dev libtbb-dev libglfw3-dev libfreetype6-dev libgtk-3-dev"
  TRACY_DEPS_COUNT=5
  TRACY_DEPS_INSTALLED="$(apt list $TRACY_DEPS) 2>/dev/null | grep installed | wc -l"
  if [ $TRACY_DEPS_INSTALLED != $TRACY_DEPS_COUNT ]
  then
    print_status "Installing dependencies now - assuming Debian."
    sudo apt install $TRACY_DEPS
  fi
  make -C "${TRACY_ROOT}/profiler/build/unix" -j12 release
fi

echo

print_status "Ensuring that we have the input MLIR file..."
if [ ! -f "${IREE_INPUT_MLIR}" ]
then
  print_status "Set IREE_INPUT_MLIR to point to some iree input MLIR file. Not found at current value ${IREE_INPUT_MLIR}."
  if [ "${IREE_INPUT_MLIR}" == "${DEFAULT_IREE_INPUT_MLIR}" ]
  then
    print_status "Okay, we actually know how to generate that file, ${IREE_INPUT_MLIR}, but it will take a while."
    print_status "Press the return key to continue..."
    pushd "${IREE_ROOT}"
    scripts/get_e2e_artifacts.py --test_suites=mobile_bert_squad_tests
    popd
  fi
fi

if [ ! -f "${IREE_INPUT_MLIR}" ]
then
  print_status "FATAL: we should have ${IREE_INPUT_MLIR} by that point."
  exit 1
fi

echo

print_status "Building IREE for Android in ${IREE_BUILD_ANDROID}..."

mkdir -p "${IREE_BUILD_ANDROID}"
pushd "${IREE_BUILD_ANDROID}"

cmake -G Ninja ../iree \
  -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
  -DANDROID_ABI="arm64-v8a" \
  -DANDROID_PLATFORM=android-30 \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DIREE_BUILD_COMPILER=OFF \
  -DIREE_BUILD_SAMPLES=OFF  \
  -DIREE_HOST_C_COMPILER=`which "$CC"` \
  -DIREE_HOST_CXX_COMPILER=`which "$CXX"` \
  -DIREE_ENABLE_RUNTIME_TRACING=ON

cmake --build . --target \
  iree_tools_iree-translate \
  iree_tools_iree-benchmark-module

popd
echo

print_status "Compiling the input MLIR file into a IREE module..."

IREE_COMPILED_MODULE=/tmp/android_module.vmfb
IREE_LOG=/tmp/iree-translate.log

rm -rf "${IREE_COMPILED_MODULE}"

IREE_LLVMAOT_LINKER_PATH="${IREE_LLVMAOT_LINKER_PATH}" \
  "${IREE_BUILD_ANDROID}/host/bin/iree-translate" \
    --iree-hal-target-backends=dylib-llvm-aot \
    --iree-mlir-to-vm-bytecode-module \
    --iree-llvm-target-triple=aarch64-linux-android \
    /tmp/iree/modules/MobileBertSquad/iree_input.mlir \
    -o "${IREE_COMPILED_MODULE}" \
    2>"${IREE_LOG}"

if [ ! -f "${IREE_COMPILED_MODULE}" ]
then
  print_status "iree-translate failed to produce ${IREE_COMPILED_MODULE}. Log saved in ${IREE_LOG}. First few lines:"
  # The whole log might be enormous if it contains a big MLIR dump.
  head -n10 "${IREE_LOG}"
  print_status "tip: check if IREE_LLVMAOT_LINKER_PATH was correctly set."
  exit 1
fi

echo

DEVICE_IREE_COMPILED_MODULE=/data/local/tmp/android_module.vmfb

print_status "Pushing the compiled module to the device..."
adb push "${IREE_COMPILED_MODULE}" "${DEVICE_IREE_COMPILED_MODULE}"
echo

print_status "Pushing the IREE benchmarking program to the device..."
adb push "${IREE_BUILD_ANDROID}"/iree/tools/iree-benchmark-module /data/local/tmp
echo

print_status "Setting up TCP port forwarding to let Tracy connect with the benchmark running on the device..."
adb forward tcp:8086 tcp:8086
echo

print_status "Now you can launch the Tracy UI in another shell and hit \"Connect\", while we run the benchmark on the device in this shell..."
print_status "Run this command in another shell:"
print_status "  ${TRACY_ROOT}/profiler/build/unix/Tracy-release"
echo

print_status "Running the benchmark... hit Ctrl-C to terminate it after Tracy is done with it."
# `TRACY_NO_EXIT=1` is to prevent it from exiting at the end: that's needed for profiling
# short-running tasks.
# `taskset 80` selects which CPU core to run on. On Pixel4, `taskset 80` gives the biggest
# core, which can get some reproducibility, as long as we don't run into thermal issues.
# `taskset 0f` would give the little cores, avoiding thermal issues but running slower and
# requiring different optimization work to be efficient on.
# `--driver=dylib` is to use the LLVM AOT generated code backend.
adb shell \
  TRACY_NO_EXIT=1 \
    taskset 80 \
      data/local/tmp/iree-benchmark-module \
        --driver=dylib \
        --module_file="${DEVICE_IREE_COMPILED_MODULE}" \
        --function_inputs="${FUNCTION_INPUTS}" \
        --entry_function="${ENTRY_FUNCTION}"

error: pathspec 'scripts/android_tracy_tutorial.sh' did not match any file(s) known to git


added sync script for production data

added sync script for production data

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/nhimbkno1/pandacoin_twitter.git/'


update build for cpptraj

update build for cpptraj

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Amber-MD/conda-recipes.git/'


Add a linux (qemu-accelerated) emulator start

workingdir=__TESTSAPP__
startdir=$(pwd)
rm -rd $workingdir
mkdir $workingdir
cd $workingdir

#android create avd -t "android-21" -n Api21 -b "default/x86"

#if [ 1 == 2 ] ; then
    echo "------------------------------------------------"
    echo "Killing the emulator..."
    time pkill ".*emulator64-x86" && true

    echo "------------------------------------------------"
    echo "Starting the emulator..."
    #time emulator -avd Api19 -no-skin -no-audio &  # -gpu on
    time emulator -avd Api21 -qemu -m 2048 -enable-kvm &
    #emulator -avd Api19 -no-skin -no-audio -no-window &

    echo "------------------------------------------------"
    echo "Creating the app..."
    time tns create TestsApp
    cd TestsApp

    echo "------------------------------------------------"
    echo "Removing the original template files..."
    time rm app/*.*

    echo "------------------------------------------------"
    echo "Copying the test app files..."
    time cp -r ../../bin/dist/apps/tests/* ./app/

    echo "------------------------------------------------"
    echo "Adding the android platform..."
    time tns platform add android #--frameworkPath=/Users/erjan/tns-android.tgz

    # #DO THE REPLACEMENTS IN THE Info.plist and AndroidManifest.xml
#    cp /Users/erjan/work/spikes/__DEL__/AndroidManifest.xml platforms/android/src/main/

    echo "------------------------------------------------"
    echo "Building the application..."
    time tns build android

    echo "------------------------------------------------"
    echo "Killing the adb server..."
    time adb kill-server

    echo "------------------------------------------------"
    echo "Starting the adb server..."
    time adb start-server

#fi

echo "------------------------------------------------"
echo "Uninstalling the app..."
time adb uninstall org.nativescript.TestsApp

echo "------------------------------------------------"
echo "Installing the app..."
time adb install ./platforms/android/build/outputs/apk/TestsApp-debug.apk

echo "------------------------------------------------"
echo "Starting the app..."
time adb shell am start -n org.nativescript.TestsApp/com.tns.NativeScriptActivity

cd $startdir

echo "------------------------------------------------"
echo "Waiting for the tests to finish executing..."
time ./expect.exp

error: pathspec 'linux-runtestapp.sh' did not match any file(s) known to git


preparing for auto mege

preparing for auto mege

if [ "$TRAVIS_BRANCH" != "test" ]; then
  exit 0;
fi

export GIT_COMMITTER_EMAIL=i"mariodeng@googlemail.com"
export GIT_COMMITTER_NAME="Mario Deng"

git checkout master || exit
git merge "$TRAVIS_COMMIT" || exit
git push origin master

error: pathspec 'merge_script.sh' did not match any file(s) known to git


Script to dump months of MC data

Script to dump months of MC data

#!/usr/bin/env bash

# Script to dump all mc tables for given months to current directory.
# Example usage: <PATH_TO_BIGMETADATA>/scripts/dump_mastercard_months.sh "us" "'09/01/2018','10/01/2018'"

country=$1 # Example: 'ca'
months=$2 # Example: "'07/01/2018','08/01/2018','09/01/2018','10/01/2018'"

AULevels=('mesh_block' 'sa1' 'sa2' 'sa3' 'sa4' 'state')
CALevels=('census_division' 'dissemination_area' 'dissemination_block' 'province')
UKLevels=('postcode_area' 'postcode_district' 'postcode_sector' 'postcode_unit')
USLevels=('block' 'block_group' 'county' 'state' 'tract' 'zcta5')

function dump_country(){
  country=$1
  local -n levels=$2
  months=$3

  for level in "${levels[@]}"; do
    psql -U postgres gis --port 5555 --host 0.0.0.0 -Atc "copy (select * from \"$country.mastercard\".mc_$level where month in ($months)) to stdout" > ./mc_${country}_${level}.dump
  done
}

case $country in
    'au' )
        dump_country au AULevels $months
        ;;
    'ca' )
        dump_country ca CALevels $months
        ;;
    'uk' )
        dump_country uk UKLevels $months
        ;;
    'us' )
        dump_country us USLevels $months
        ;;
esac

error: pathspec 'scripts/dump_mastercard_months.sh' did not match any file(s) known to git


fix git push

fix git push

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/gammasoft71/Switch.git/'


reInstall added

reInstall added

#!/bin/bash
#
# Copyright (c) 2016 Thomas Findelkind
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program.  If not, see <http://www.gnu.org/licenses/>.
#
# MORE ABOUT THIS SCRIPT AVAILABLE IN THE README AND AT:
#
# http://tfindelkind.com
#
# ---------------------------------------------------------------------------- #

## MAIN block-------------------------------------------------------------

# retrieve os
case $OSTYPE in
	darwin* )
		os="mac" ;;
	linux* )
		if [ -f "/etc/redhat-release" ]; then os="redhat"; fi
		if [ -f "/etc/debian_version" ]; then os="debian"; fi
		;;
esac

## redhat style
 if [ $os == "redhat" ]; then
   # remove the instance
  rm -rf /var/lib/cloud/instances
   # run the cloud-init again
  systemctl restart cloud-init.service
 fi

error: pathspec 'NTNX-AVM/reinstall.sh' did not match any file(s) known to git


execute integration tests only if unit tests pass

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clockworkorange/grails-core.git/'


fixed travis_build issues

fixed travis_build issues

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/brands4friends/daleq.git/'


add speedtest-cli installation

add speedtest-cli installation

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mspl13/dotfiles.git/'


Add clean-all-gradle-projects.sh:

Add clean-all-gradle-projects.sh:

Simple invocation of `rm -rf build` in folders where `build.gradle` present.

#!/bin/bash
dest=${1:-.}
deep=${2:-5}
echo "Cleaning all gradle projects in directory $dest with maxdepth $deep";
find "$dest" -maxdepth "$deep" -type f -name 'build.gradle' -exec bash -c "cd \$(dirname \"{}\") && [[ -d build ]] && echo 'Cleaning {}' && rm -r build" \;

error: pathspec 'shell-scripts/clean-all-gradle-projects.sh' did not match any file(s) known to git


question partially ansered.

question partially ansered.

opt -Oz -dce libc.so.bc -o libc-opt.so.bc
llvm-dis libc-opt.so.bc

error: pathspec 'examples/linux/musl_nweb/question.sh' did not match any file(s) known to git


Set pip timeout to 60s when using pypi

Set pip timeout to 60s when using pypi

Change-Id: I8bb781773558ca1aef6ad395516c7cc84b3694e6

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/open-switch/infra_puppet-jenkins.git/'


Add first draft of auto download

Add first draft of auto download

#/bin/bash

torrentzurl=$1
limetorrentstub=www.limetorrents.com
torrentwatchloc=/home/chris/torrent/watch

torrentzcontent=$(curl -L $torrentzurl)
[[ $torrentzcontent =~ (http:\/\/$limetorrentstub\/[^\"]*)\" ]] && torrenturl=$$
echo "found limetorrent torrent page at $torrenturl"

torrentcontent=$(curl -L $torrenturl)
[[ $torrentcontent =~ (http:\/\/www.limetorrents.com\/download\/[^\"]*)\" ]] &&$
echo "found torrent file at $torrentfileurl"

torrentfilecontent=$(curl -L --globoff $torrentfileurl)
desttorrentfile=$torrentwatchloc/$(date +%s).torrent
echo "$torrentfilecontent" > $desttorrentfile
echo "torrent file downloaded successfully, located at $desttorrentfile"

error: pathspec 'autodownload.sh' did not match any file(s) known to git


[sh] Added helper to run JHBuild commands

#!/bin/bash

BASE_PATH="`dirname \"$0\"`"
FULL_SCRIPT_PATH=$(readlink -f $0)
FULL_BASE_PATH="`dirname \"$FULL_SCRIPT_PATH\"`"

${BASE_PATH}/jhbuild-install/bin/jhbuild -f ${BASE_PATH}/jhbuildrc $@

error: pathspec 'jhbuild.sh' did not match any file(s) known to git


Akka based cross filter inital milestone

#!/bin/bash
## 启动master

SOURCE="${BASH_SOURCE[0]}"
BIN_DIR="$( dirname "$SOURCE" )"
cd $BIN_DIR/..

Target="bin/akka-1.0-RELEASE-all.jar"
Class="cn.gridx.scala.akka.app.crossfilter.Master"
Lib="lib/*"
Log4j2Conf="conf/log4j2"
MasterConf="conf/master"

java -cp $Target:$Log4j2Conf:$MasterConf:$Lib $Class --dataPath /disk2/app/crossfilter/data/sample.impact --minWorkerActors 10

error: pathspec 'akka/src/main/scala/cn/gridx/scala/akka/app/crossfilter/dist/bin/startMaster.sh' did not match any file(s) known to git


o script to slap archiva

o script to slap archiva

git-svn-id: f25645bd54002203a47bb62c0b0afba5efd98acb@478448 13f79535-47bb-0310-9956-ffa450edef68

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/emsouza/archiva.git/'


Use velocity CLI for test sample package

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/xolvio/meteor-jasmine.git/'


docker command

docker command

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/TOTVS/mdmpublic.git/'


Add file with helper functions for geom tools regression tests.

#!/bin/sh
# $FreeBSD$

kldstat -q -m g_${class} || g${class} load || exit 1

devwait()
{
	while :; do
		if [ -c /dev/${class}/${name} ]; then
			return
		fi
		sleep 0.2
	done
}

error: pathspec 'tools/regression/geom_subr.sh' did not match any file(s) known to git


travis: show CMake version

travis: show CMake version

I want to use "OBJECT" in add_library() that is introduced by CMake
2.8.8. But it failes on Travis CI. So I want to confirm the cmake
version on Travis CI.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/hiroyuki-sato/groonga.git/'


Installer generator for OS X (untested)

Installer generator for OS X (untested)

#!/bin/sh -e

Usage () {
    echo "Usage: installer_mac.sh [[--sign] | [--create-dmg]]"
}

APP_NAME=MEGAcmd
MOUNTDIR=tmp
RESOURCES=installer/resourcesDMG
QTBASE=/QT/qt5/qtbase

sign=0
createdmg=0

while [ "$1" != "" ]; do
    case $1 in
        --sign )		sign=1
                                ;;
        --create-dmg )		createdmg=1
                                ;;
        -h | --help )           Usage
                                exit
                                ;;
        * )                     Usage
                                exit 1
    esac
    shift
done

rm -rf Release_x64
mkdir Release_x64
cd Release_x64
$QTBASE/bin/lrelease ../../../contrib/QtCreator/MEGAcmd/MEGAcmd.pro
$QTBASE/bin/qmake -r ../../../contrib/QtCreator/MEGAcmd/ -spec macx-g++ CONFIG+=release CONFIG+=x86_64 -nocache
make -j4

cp -R MEGAcmdServer/MEGAcmdServer.app MEGAcmdServer/MEGAcmd_orig.app
$QTBASE/bin/macdeployqt MEGAcmdServer/MEGAcmdServer.app
dsymutil MEGAcmdServer/MEGAcmdServer.app/Contents/MacOS/MEGAcmd -o MEGAcmd.app.dSYM
strip MEGAcmdServer/MEGAcmdServer.app/Contents/MacOS/MEGAcmd
dsymutil MEGAcmdClient/MEGAcmdClient.app/Contents/MacOS/MEGAclient -o MEGAclient.dSYM
strip MEGAcmdClient/MEGAcmdClient.app/Contents/MacOS/MEGAclient
mv MEGAcmdClient/MEGAcmdClient.app/Contents/MacOS/MEGAclient MEGAcmdServer/MEGAcmdServer.app/Contents/MacOS/MEGAclient
mv MEGAcmdServer/MEGAcmdServer.app ./MEGAcmd.app

if [ "$sign" = "1" ]; then
	cp -R $APP_NAME.app ${APP_NAME}_unsigned.app
	echo "Signing 'APPBUNDLE'"
	codesign --force --verify --verbose --sign "Developer ID Application: Mega Limited" --deep $APP_NAME.app
	echo "Checking signature"
	spctl -vv -a $APP_NAME.app
fi

if [ "$createdmg" = "1" ]; then
	echo "DMG CREATION PROCESS..."
	echo "Creating temporary Disk Image (1/7)"
	#Create a temporary Disk Image
	/usr/bin/hdiutil create -srcfolder $APP_NAME.app/ -volname $APP_NAME -ov $APP_NAME-tmp.dmg -format UDRW >/dev/null

	echo "Attaching the temporary image (2/7)"
	#Attach the temporary image
	mkdir $MOUNTDIR
	/usr/bin/hdiutil attach $APP_NAME-tmp.dmg -mountroot $MOUNTDIR >/dev/null

	echo "Copying resources (3/7)"
	#Copy the background, the volume icon and DS_Store files
	unzip -d $MOUNTDIR/$APP_NAME ../$RESOURCES.zip
	/usr/bin/SetFile -a C $MOUNTDIR/$APP_NAME

	echo "Adding symlinks (4/7)"
	#Add a symbolic link to the Applications directory
	ln -s /Applications/ $MOUNTDIR/$APP_NAME/Applications

	echo "Detaching temporary Disk Image (5/7)"
	#Detach the temporary image
	/usr/bin/hdiutil detach $MOUNTDIR/$APP_NAME >/dev/null

	echo "Compressing Image (6/7)"
	#Compress it to a new image
	/usr/bin/hdiutil convert $APP_NAME-tmp.dmg -format UDZO -o $APP_NAME.dmg >/dev/null

	echo "Deleting temporary image (7/7)"
	#Delete the temporary image
	rm $APP_NAME-tmp.dmg
	rmdir $MOUNTDIR
fi

echo "Cleaning"
rm -rf MEGAcmdServer
rm -rf MEGAcmdClient

echo "DONE"

error: pathspec 'examples/megacmd/build/installer_mac.sh' did not match any file(s) known to git


Fixed bug in bash autocomplete.

Fixed bug in bash autocomplete.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/overridelogic/bruces.git/'


added run script

added run script

#!/bin/bash
echo "Starting DiscoBot..."
python ./main.py

error: pathspec 'bin/discobot.sh' did not match any file(s) known to git


Add PowerPC LE CI for support/docker_build.sh.

Review: https://reviews.apache.org/r/45803/

#!/usr/bin/env bash

set -xe

# This is the script used by ASF Jenkins to build and check Mesos for
# a given OS and compiler combination.

# Require the following environment variables to be set.
: ${OS:?"Environment variable 'OS' must be set (e.g., OS=ubuntu14.04)"}
: ${COMPILER:?"Environment variable 'COMPILER' must be set (e.g., COMPILER=gcc)"}
: ${CONFIGURATION:?"Environment variable 'CONFIGURATION' must be set (e.g., CONFIGURATION='--enable-libevent --enable-ssl')"}
: ${ENVIRONMENT:?"Environment variable 'ENVIRONMENT' must be set (e.g., ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1')"}

# Change to the root of Mesos repo for docker build context.
MESOS_DIRECTORY=$( cd "$( dirname "$0" )/.." && pwd )
cd "$MESOS_DIRECTORY"

# TODO(vinod): Once ASF CI supports Docker 1.5 use a custom name for
# Dockerfile to avoid overwriting Dockerfile (if it exists) at the root
# of the repo.
DOCKERFILE="Dockerfile"

rm -f $DOCKERFILE # Just in case a stale one exists.

# Helper function that appends instructions to docker file.
function append_dockerfile {
   echo $1 >> $DOCKERFILE
}

# TODO(vinod): Add support for Fedora and Debian.
case $OS in
  centos*)
    # NOTE: Currently we only support CentOS7+ due to the
    # compiler versions needed to compile Mesos.

    append_dockerfile "FROM $OS"

    # Install dependencies.

    append_dockerfile "RUN yum install -y which"
    append_dockerfile "RUN yum groupinstall -y 'Development Tools'"
    append_dockerfile "RUN yum install -y epel-release" # Needed for clang.
    append_dockerfile "RUN yum install -y clang git maven"
    append_dockerfile "RUN yum install -y java-1.8.0-openjdk-devel python-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-utils-devel libevent-devel libev-devel"

    # Add an unprivileged user.
    append_dockerfile "RUN adduser mesos"
   ;;
  *ubuntu*)
    # NOTE: Currently we only support Ubuntu13.10+ due to the
    # compiler versions needed to compile Mesos.

    append_dockerfile "FROM $OS"

    # NOTE: We need to do this to fix some flakiness while fetching packages.
    # See https://bugs.launchpad.net/ubuntu/+source/apt/+bug/972077
    append_dockerfile "RUN rm -rf /var/lib/apt/lists/*"

    # Install dependencies.
    # IBM Power only supports Ubuntu 14.04 and gcc compiler.
    [ "$(uname -m)" = "x86_64" ] && CLANG_PKG=clang || CLANG_PKG=
    append_dockerfile "RUN apt-get update"
    append_dockerfile "RUN apt-get -y install build-essential $CLANG_PKG git maven autoconf libtool"
    append_dockerfile "RUN apt-get -y install openjdk-7-jdk python-dev python-boto libcurl4-nss-dev libsasl2-dev libapr1-dev libsvn-dev libevent-dev libev-dev"

    # Add an unpriviliged user.
    append_dockerfile "RUN adduser --disabled-password --gecos '' mesos"

    # Disable any tests failing on Ubuntu.
    append_dockerfile "ENV GTEST_FILTER -FsTest.FileSystemTableRead"
    ;;
  *)
    echo "Unknown OS $OS"
    exit 1
    ;;
esac

case $COMPILER in
  gcc)
    append_dockerfile "ENV CC gcc"
    append_dockerfile "ENV CXX g++"
    ;;
  clang)
    append_dockerfile "ENV CC clang"
    append_dockerfile "ENV CXX clang++"
    ;;
  *)
    echo "Unknown Compiler $COMPILER"
    exit 1
    ;;
esac

# Set working directory.
append_dockerfile "WORKDIR mesos"

# Copy Mesos source tree into the image.
append_dockerfile "COPY . /mesos/"

# NOTE: We run all the tests as unprivileged 'mesos' user because
# we need to fix cgroups related tests to work inside Docker; certain
# tests (e.g., ContainerizerTest) enable cgroups isolation if the user
# is 'root'.
# TODO(vinod): Fix cgroups tests to work inside Docker.
append_dockerfile "RUN chown -R mesos /mesos"
append_dockerfile "USER mesos"

# Generate xml reports to be displayed by jenkins xUnit plugin.
append_dockerfile "ENV GTEST_OUTPUT xml:report.xml"

# Ensure `make distcheck` inherits configure flags.
append_dockerfile "ENV DISTCHECK_CONFIGURE_FLAGS $CONFIGURATION"

# Set the environment for build.
append_dockerfile "ENV $ENVIRONMENT"

# Build and check Mesos.
append_dockerfile "CMD ./bootstrap && ./configure $CONFIGURATION && make -j8 distcheck"

# Generate a random image tag.
TAG=mesos-`date +%s`-$RANDOM

# Build the Docker image.
# TODO(vinod): Instead of building Docker images on the fly host the
# images on DockerHub and use them.
docker build --no-cache=true -t $TAG .

# Set a trap to delete the image on exit.
trap "docker rmi $TAG" EXIT

# Uncomment below to print kernel log incase of failures.
# trap "dmesg" ERR

# Now run the image.
# NOTE: We run in 'privileged' mode to circumvent permission issues
# with AppArmor. See https://github.com/docker/docker/issues/7276.
docker run --privileged --rm $TAG

#!/usr/bin/env bash

set -xe

# This is the script used by ASF Jenkins to build and check Mesos for
# a given OS and compiler combination.

# Require the following environment variables to be set.
: ${OS:?"Environment variable 'OS' must be set (e.g., OS=ubuntu14.04)"}
: ${COMPILER:?"Environment variable 'COMPILER' must be set (e.g., COMPILER=gcc)"}
: ${CONFIGURATION:?"Environment variable 'CONFIGURATION' must be set (e.g., CONFIGURATION='--enable-libevent --enable-ssl')"}
: ${ENVIRONMENT:?"Environment variable 'ENVIRONMENT' must be set (e.g., ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1')"}

# Change to the root of Mesos repo for docker build context.
MESOS_DIRECTORY=$( cd "$( dirname "$0" )/.." && pwd )
cd "$MESOS_DIRECTORY"

# TODO(vinod): Once ASF CI supports Docker 1.5 use a custom name for
# Dockerfile to avoid overwriting Dockerfile (if it exists) at the root
# of the repo.
DOCKERFILE="Dockerfile"

rm -f $DOCKERFILE # Just in case a stale one exists.

# Helper function that appends instructions to docker file.
function append_dockerfile {
   echo $1 >> $DOCKERFILE
}

# TODO(vinod): Add support for Fedora and Debian.
case $OS in
  centos*)
    # NOTE: Currently we only support CentOS7+ due to the
    # compiler versions needed to compile Mesos.

    append_dockerfile "FROM $OS"

    # Install dependencies.

    append_dockerfile "RUN yum install -y which"
    append_dockerfile "RUN yum groupinstall -y 'Development Tools'"
    append_dockerfile "RUN yum install -y epel-release" # Needed for clang.
    append_dockerfile "RUN yum install -y clang git maven"
    append_dockerfile "RUN yum install -y java-1.8.0-openjdk-devel python-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-utils-devel libevent-devel libev-devel"

    # Add an unprivileged user.
    append_dockerfile "RUN adduser mesos"
   ;;
  ubuntu*)
    # NOTE: Currently we only support Ubuntu13.10+ due to the
    # compiler versions needed to compile Mesos.

    append_dockerfile "FROM $OS"

    # NOTE: We need to do this to fix some flakiness while fetching packages.
    # See https://bugs.launchpad.net/ubuntu/+source/apt/+bug/972077
    append_dockerfile "RUN rm -rf /var/lib/apt/lists/*"

    # Install dependencies.
    append_dockerfile "RUN apt-get update"
    append_dockerfile "RUN apt-get -y install build-essential clang git maven autoconf libtool"
    append_dockerfile "RUN apt-get -y install openjdk-7-jdk python-dev python-boto libcurl4-nss-dev libsasl2-dev libapr1-dev libsvn-dev libevent-dev libev-dev"

    # Add an unpriviliged user.
    append_dockerfile "RUN adduser --disabled-password --gecos '' mesos"

    # Disable any tests failing on Ubuntu.
    append_dockerfile "ENV GTEST_FILTER -FsTest.FileSystemTableRead"
    ;;
  *)
    echo "Unknown OS $OS"
    exit 1
    ;;
esac

case $COMPILER in
  gcc)
    append_dockerfile "ENV CC gcc"
    append_dockerfile "ENV CXX g++"
    ;;
  clang)
    append_dockerfile "ENV CC clang"
    append_dockerfile "ENV CXX clang++"
    ;;
  *)
    echo "Unknown Compiler $COMPILER"
    exit 1
    ;;
esac

# Set working directory.
append_dockerfile "WORKDIR mesos"

# Copy Mesos source tree into the image.
append_dockerfile "COPY . /mesos/"

# NOTE: We run all the tests as unprivileged 'mesos' user because
# we need to fix cgroups related tests to work inside Docker; certain
# tests (e.g., ContainerizerTest) enable cgroups isolation if the user
# is 'root'.
# TODO(vinod): Fix cgroups tests to work inside Docker.
append_dockerfile "RUN chown -R mesos /mesos"
append_dockerfile "USER mesos"

# Generate xml reports to be displayed by jenkins xUnit plugin.
append_dockerfile "ENV GTEST_OUTPUT xml:report.xml"

# Ensure `make distcheck` inherits configure flags.
append_dockerfile "ENV DISTCHECK_CONFIGURE_FLAGS $CONFIGURATION"

# Set the environment for build.
append_dockerfile "ENV $ENVIRONMENT"

# Build and check Mesos.
append_dockerfile "CMD ./bootstrap && ./configure $CONFIGURATION && make -j8 distcheck"

# Generate a random image tag.
TAG=mesos-`date +%s`-$RANDOM

# Build the Docker image.
# TODO(vinod): Instead of building Docker images on the fly host the
# images on DockerHub and use them.
docker build --no-cache=true -t $TAG .

# Set a trap to delete the image on exit.
trap "docker rmi $TAG" EXIT

# Uncomment below to print kernel log incase of failures.
# trap "dmesg" ERR

# Now run the image.
# NOTE: We run in 'privileged' mode to circumvent permission issues
# with AppArmor. See https://github.com/docker/docker/issues/7276.
docker run --privileged --rm $TAG


Update docs.

Update docs.

#!/bin/bash
set -o errexit -o nounset -o pipefail
function -h {
cat <<USAGE
 USAGE: ubuntu.bash

  Installs Chronos in one step.

  Installs all deb packages, downloads and builds Mesos and Chronos from
  Github and then installs a Chronos wrapper in $prefix/bin.

USAGE
}; function --help { -h ;}

prefix=/usr/local

function main {
  local cmd=()
  if [[ -f /etc/issue ]]
  then
    case "$(cut -d' ' -f1 < /etc/issue)" in
      Ubuntu) cmd=( ubuntu ) ;;
      *)      err "Not able to ID your system from /etc/issue." ;;
    esac
  fi
  if exists sw_vers
  then cmd=( os_x )
  fi
  "${cmd[@]}"
}

jdk_link=http://www.oracle.com/technetwork/java/javase/downloads/index.html
function os_x {(
  tmp
  exists brew || err "Please install Homebrew."
  exists g++  || err "Please install the Apple developer tools."
  exists gcc  || err "Please install the Apple developer tools."
  ( exists java && java -version 2>&1 | fgrep -q 1.7. ) ||
    err "Please install: JDK 1.7\n  $jdk_link"
  exists mvn  || err "Please install Maven (\`brew install maven' will work)."
  mesos
  chronos
)}

ubuntu_debs=( autoconf make gcc g++ cpp patch python-dev libtool
              default-jdk default-jdk-builddep default-jre maven
              gzip libghc-zlib-dev libcurl4-openssl-dev )
function ubuntu {(
  tmp
  task_wrapper debs "${ubuntu_debs[@]}"
  mesos
  chronos
)}

mesos_ref=0.12.x
function mesos {(
  tmp
  task_wrapper mesos_download
  cd mesos
  task_wrapper mesos_build
)}

function mesos_download {
  if [[ -d mesos ]]
  then msg "Already downloaded Mesos."
  else github_tgz apache/mesos "$mesos_ref" | tgz_into mesos
  fi
}

function mesos_build {
  [[ -f ./configure ]] || ./bootstrap
  ./configure --prefix="$prefix" \
    --with-webui --with-included-zookeeper --disable-perftools
  make
  make install
}

chronos_ref=master
function chronos {(
  tmp
  task_wrapper chronos_download
  cd chronos
  task_wrapper chronos_build
)}

function chronos_download {
  if [[ -d chronos ]]
  then msg "Already downloaded Chronos."
  else github_tgz airbnb/chronos "$chronos_ref" | tgz_into chronos
  fi
}

function chronos_build {
  export MESOS_NATIVE_LIBRARY="$prefix"/lib/libmesos.so
  mvn package
  rsync -ai ./ "$prefix"/chronos
  chronos_runner
}

function chronos_runner {
cat > "$prefix"/bin/chronos <<EOF
export MESOS_NATIVE_LIBRARY='$prefix'/lib/libmesos.so
default='$prefix'/chronos/config/local_scheduler_nozk.yml
if [ "\$1" = "-h" ]
then
cat <<USAGE
 USAGE: chronos
        chronos /path/to/config
USAGE
else
  java -cp '$prefix'/chronos/target/chronos*.jar com.airbnb.scheduler.Main \
       server "\${1:-\$default}"
fi
EOF
chmod a+rx "$prefix"/bin/chronos
}

function debs {
  DEBIAN_FRONTEND=noninteractive apt-get install --yes "$@"
}

function github_tgz {
  local repo="$1" ; shift
  local ref="$1" ; shift
  curl -fL https://api.github.com/repos/"$repo"/tarball/"$ref" "$@"
}

function tgz_into {
  local rand="$1"."$(printf '%04x%04x\n' $RANDOM $RANDOM)"
  mkdir -p "$rand"
  tar -xz -C "$rand" --strip-components 1 # Yes, this last option is portable.
  mv "$rand" "$1"
}

declare hasher
function hasher {
  if [[ ! ${hasher:+isset} ]]
  then
    hasher="$(which md5sum)" ||
    hasher="$(which md5)" ||
    err "No hashing program found!"
  fi
  "$hasher" <<<"$*" | cut -d' ' -f1
}

tmp_msg=false
tmp=/tmp/chronos-build."$(hasher "$prefix" "$chronos_ref" "$mesos_ref")"
function tmp {
  $tmp_msg || msg "Building in $tmp"
  tmp_msg=true
  mkdir -p "$tmp"
  cd "$tmp"
}

function task_wrapper {
  local dir="$(pwd -P)"
  local t0="$(date +%T)"
  msg "$1 $t0 start..."
  set +o errexit               ## Fancy error code capturing is portable
  ( set -o errexit             ## across old and new versions of Bash and
    "$@" 1>task.out 2>task.err ## works with calls to Bash functions as
    set +o errexit )           ## well as external commands.
  local code=$?                ####
  set -o errexit               ####
  if [[ $code -eq 0 ]]
  then
    msg "$1 $t0/$(date +%T) ...finish"
  else
    msg "==== tail -n20 $dir/task.out"
    tail -n20 "$dir"/task.out >&2
    echo
    msg "==== tail -n20 $dir/task.err"
    tail -n20 "$dir"/task.err >&2
    msg "$1 $t0/$(date +%T) failed in $dir"
    return $code
  fi
}

function exists {
  which "$1" &>/dev/null
}

function msg { out "$*" >&2 ;}
function err { local x=$? ; msg "$*" ; return $(( $x == 0 ? 1 : $x )) ;}
function out { printf '%s\n' "$*" ;}

if [[ ${1:-} ]] && declare -F | cut -d' ' -f3 | fgrep -qx -- "${1:-}"
then "$@"
else main "$@"
fi

#!/bin/bash
set -o errexit -o nounset -o pipefail
function -h {
cat <<USAGE
 USAGE: ubuntu.bash

  Installs Chronos in one step.

USAGE
}; function --help { -h ;}

prefix=/usr/local

function main {
  local cmd=()
  if [[ -f /etc/issue ]]
  then
    case "$(cut -d' ' -f1 < /etc/issue)" in
      Ubuntu) cmd=( ubuntu ) ;;
      *)      err "Not able to ID your system from /etc/issue." ;;
    esac
  fi
  if exists sw_vers
  then cmd=( os_x )
  fi
  "${cmd[@]}"
}

jdk_link=http://www.oracle.com/technetwork/java/javase/downloads/index.html
function os_x {(
  tmp
  exists brew || err "Please install Homebrew."
  exists g++  || err "Please install the Apple developer tools."
  exists gcc  || err "Please install the Apple developer tools."
  ( exists java && java -version 2>&1 | fgrep -q 1.7. ) ||
    err "Please install: JDK 1.7\n  $jdk_link"
  exists mvn  || err "Please install Maven (\`brew install maven' will work)."
  mesos
  chronos
)}

ubuntu_debs=( autoconf make gcc g++ cpp patch python-dev libtool
              default-jdk default-jdk-builddep default-jre maven
              gzip libghc-zlib-dev libcurl4-openssl-dev )
function ubuntu {(
  tmp
  task_wrapper debs "${ubuntu_debs[@]}"
  mesos
  chronos
)}

mesos_ref=0.12.x
function mesos {(
  tmp
  task_wrapper mesos_download
  cd mesos
  task_wrapper mesos_build
)}

function mesos_download {
  if [[ -d mesos ]]
  then msg "Already downloaded Mesos."
  else github_tgz apache/mesos "$mesos_ref" | tgz_into mesos
  fi
}

function mesos_build {
  [[ -f ./configure ]] || ./bootstrap
  ./configure --prefix="$prefix" \
    --with-webui --with-included-zookeeper --disable-perftools
  make
  make install
}

chronos_ref=master
function chronos {(
  tmp
  task_wrapper chronos_download
  cd chronos
  task_wrapper chronos_build
)}

function chronos_download {
  if [[ -d chronos ]]
  then msg "Already downloaded Chronos."
  else github_tgz airbnb/chronos "$chronos_ref" | tgz_into chronos
  fi
}

function chronos_build {
  export MESOS_NATIVE_LIBRARY="$prefix"/lib/libmesos.so
  mvn package
  rsync -ai ./ "$prefix"/chronos
  chronos_runner
}

function chronos_runner {
cat > "$prefix"/bin/chronos <<EOF
export MESOS_NATIVE_LIBRARY='$prefix'/lib/libmesos.so
default='$prefix'/chronos/config/local_scheduler_nozk.yml
if [ "\$1" = "-h" ]
then
cat <<USAGE
 USAGE: chronos
        chronos /path/to/config
USAGE
else
  java -cp '$prefix'/chronos/target/chronos*.jar com.airbnb.scheduler.Main \
       server "\${1:-\$default}"
fi
EOF
chmod a+rx "$prefix"/bin/chronos
}

function debs {
  DEBIAN_FRONTEND=noninteractive apt-get install --yes "$@"
}

function github_tgz {
  local repo="$1" ; shift
  local ref="$1" ; shift
  curl -fL https://api.github.com/repos/"$repo"/tarball/"$ref" "$@"
}

function tgz_into {
  local rand="$1"."$(printf '%04x%04x\n' $RANDOM $RANDOM)"
  mkdir -p "$rand"
  tar -xz -C "$rand" --strip-components 1 # Yes, this last option is portable.
  mv "$rand" "$1"
}

declare hasher
function hasher {
  if [[ ! ${hasher:+isset} ]]
  then
    hasher="$(which md5sum)" ||
    hasher="$(which md5)" ||
    err "No hashing program found!"
  fi
  "$hasher" <<<"$*" | cut -d' ' -f1
}

tmp_msg=false
tmp=/tmp/chronos-build."$(hasher "$prefix" "$chronos_ref" "$mesos_ref")"
function tmp {
  $tmp_msg || msg "Building in $tmp"
  tmp_msg=true
  mkdir -p "$tmp"
  cd "$tmp"
}

function task_wrapper {
  local dir="$(pwd -P)"
  local t0="$(date +%T)"
  msg "$1 $t0 start..."
  set +o errexit               ## Fancy error code capturing is portable
  ( set -o errexit             ## across old and new versions of Bash and
    "$@" 1>task.out 2>task.err ## works with calls to Bash functions as
    set +o errexit )           ## well as external commands.
  local code=$?                ####
  set -o errexit               ####
  if [[ $code -eq 0 ]]
  then
    msg "$1 $t0/$(date +%T) ...finish"
  else
    msg "==== tail -n20 $dir/task.out"
    tail -n20 "$dir"/task.out >&2
    echo
    msg "==== tail -n20 $dir/task.err"
    tail -n20 "$dir"/task.err >&2
    msg "$1 $t0/$(date +%T) failed in $dir"
    return $code
  fi
}

function exists {
  which "$1" &>/dev/null
}

function msg { out "$*" >&2 ;}
function err { local x=$? ; msg "$*" ; return $(( $x == 0 ? 1 : $x )) ;}
function out { printf '%s\n' "$*" ;}

if [[ ${1:-} ]] && declare -F | cut -d' ' -f3 | fgrep -qx -- "${1:-}"
then "$@"
else main "$@"
fi


VVV init: Support manual invocation

VVV init: Support manual invocation

Useful for those who don't want to reload vagrant just to add a site

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/kucrut/wp-stack.git/'


Create tensorflow_gpu_setup.sh

Create tensorflow_gpu_setup.sh

#!/bin/bash

# Install Nvidia Driver
command -v nvidia-smi >/dev/null 2>&1 || { echo "Installing Nvidia Library" >&2; sudo apt-get install nvidia-352-updates;}

# Download cuda_tookit and cudann files
# Use SCP

# Copy CudaNN
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

# Append Environment variables
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_ROOT/lib64' >> ~/.bashrc
echo 'export CUDA_HOME=/usr/local/cuda' >> ~/.bashrc
echo 'export CUDA_VISIBLE_DEVICES=0' >> ~/.bashrc
echo 'export LC_ALL=en_US.UTF-8' >> ~/.bashrc
echo 'export LANG=en_US.UTF-8' >> ~/.bashrc

error: pathspec 'tensorflow_gpu_setup.sh' did not match any file(s) known to git


test

test

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/shiyangcao/ec2-vps-tools.git/'


Add docker build wrapper

Add docker build wrapper

#!/bin/bash

docker build -t local/template .

error: pathspec 'build-docker.sh' did not match any file(s) known to git


build: void a potential clash of PACKAGESDIR and pkg-repo in the future

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/OptimEnterprises/tools.git/'


Minor addition.

Minor addition.

#!/bin/sh

files=$(ls *.whiley)

for f in $files
do
    echo $f
    cat $f | sed -e "s/this\./this->/g" > $f.new
    rm $f
    mv $f.new $f
done

error: pathspec 'tests/base/valid/run.sh' did not match any file(s) known to git


Add Code Intelligence go114-fuzz-build fork (#7221)

The patched Go versions adds a new runtime function to register
8bit counters when initializing the fuzz target. This is needed to
register those counters with libfuzzer and get real edge coverage.
This change is meant to be a temporary change until the Go patches are
accepted upstream. Then, we will create a pull request for
go114-fuzz-build

#!/bin/bash -eux
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

# Install CodeIntelligenceTesting Go.
## Require at least Go1.4 to boostrap.
git clone --depth=1 -b dev.libfuzzer.18 https://github.com/CodeIntelligenceTesting/go.git /tmp/go-CodeIntelligenceTesting
# Disable tests, at least one of which erroneously fails.
sed -i '/^exec .* tool dist test -rebuild "$@"/ s/./#&/' /tmp/go-CodeIntelligenceTesting/src/run.bash
# ./all.bash has to be run inside the src/ directory.
(cd /tmp/go-CodeIntelligenceTesting/src/; ./all.bash)

# Replace original Go with the one from CodeIntelligenceTesting.
rm -rf /root/.go
mv -f /tmp/go-CodeIntelligenceTesting /root/.go

# Install go114-fuzz-build with the new Go.
rm -rf "$GOPATH/"
mkdir -p "$GOPATH/"
go install github.com/CodeIntelligenceTesting/go114-fuzz-build@latest
ln -s "$GOPATH/bin/go114-fuzz-build" "$GOPATH/bin/go-fuzz"

# Re-install ossfuzz_coverage_runner.go.
wget -O $GOPATH/ossfuzz_coverage_runner.go https://raw.githubusercontent.com/google/oss-fuzz/898bbe41e57f841d15cb9d30bd42105460857386/infra/base-images/base-builder-go/ossfuzz_coverage_runner.go

#!/bin/bash -eux
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

# Install CodeIntelligenceTesting Go.
## Require at least Go1.4 to boostrap.
git clone --depth=1 -b dev.libfuzzer.18 https://github.com/CodeIntelligenceTesting/go.git /tmp/go-CodeIntelligenceTesting
# Disable tests, at least one of which erroneously fails.
sed -i '/^exec .* tool dist test -rebuild "$@"/ s/./#&/' /tmp/go-CodeIntelligenceTesting/src/run.bash
# ./all.bash has to be run inside the src/ directory.
(cd /tmp/go-CodeIntelligenceTesting/src/; ./all.bash)

# Replace original Go with the one from CodeIntelligenceTesting.
rm -rf /root/.go
mv -f /tmp/go-CodeIntelligenceTesting /root/.go

# Install go114-fuzz-build with the new Go.
rm -rf "$GOPATH/"
mkdir -p "$GOPATH/"
go install github.com/mdempsky/go114-fuzz-build@latest
ln -s "$GOPATH/bin/go114-fuzz-build" "$GOPATH/bin/go-fuzz"

# Re-install ossfuzz_coverage_runner.go.
wget -O $GOPATH/ossfuzz_coverage_runner.go https://raw.githubusercontent.com/google/oss-fuzz/898bbe41e57f841d15cb9d30bd42105460857386/infra/base-images/base-builder-go/ossfuzz_coverage_runner.go


fix shellcheck

fix shellcheck

#!/bin/bash

# Copyright 2018 Istio Authors

#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at

#       http://www.apache.org/licenses/LICENSE-2.0

#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

set -x

if [[ -z "$CB_BRANCH" ]]; then
  CB_BRANCH=$GIT_BRANCH
  if [[ -z "$CB_BRANCH" ]]; then
    echo "CB_BRANCH not set please set it"
    exit 1
  fi
fi
if [[ -z "$CB_VERSION" ]]; then
  CB_VERSION=$CB_BRANCH-$(date '+%Y%m%d-%H-%M')
fi
if [[ -z "$CB_PIPELINE_TYPE" ]]; then
  CB_PIPELINE_TYPE=daily
fi
if [[ -z "$CB_COMMIT" ]]; then
  git clone "https://github.com/istio/istio" -b "${CB_BRANCH}" --depth 1
  pushd istio || exit 1
    CB_COMMIT=$(git rev-parse HEAD)
  popd || exit 2
fi

GOPATH=$PWD/go
mkdir -p go/bin
GOBIN=$GOPATH/bin

time go get -u istio.io/test-infra/toolbox/githubctl

# this setting is required by githubctl, which runs git commands
git config --global user.name "TestRunnerBot"
git config --global user.email "testrunner@istio.io"

"$GOBIN/githubctl" \
    --token_file="$GITHUB_TOKEN_FILE" \
    --op=relPipelineBuild \
    --tag="$CB_VERSION" \
    --base_branch="$CB_BRANCH" \
    --ref_sha="$CB_COMMIT" \
    --pipeline="$CB_PIPELINE_TYPE"

echo build triggered

#!/bin/bash

# Copyright 2018 Istio Authors

#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at

#       http://www.apache.org/licenses/LICENSE-2.0

#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

set -x

if [[ -z "$CB_BRANCH" ]]; then
  CB_BRANCH=$GIT_BRANCH
  if [[ -z "$CB_BRANCH" ]]; then
    echo "CB_BRANCH not set please set it"
    exit 1
  fi
fi
if [[ -z "$CB_VERSION" ]]; then
  CB_VERSION=$CB_BRANCH-$(date '+%Y%m%d-%H-%M')
fi
if [[ -z "$CB_PIPELINE_TYPE" ]]; then
  CB_PIPELINE_TYPE=daily
fi
if [[ -z "$CB_COMMIT" ]]; then
  git clone "https://github.com/istio/istio" -b "${CB_BRANCH}" --depth 1
  pushd istio
    CB_COMMIT=$(git rev-parse HEAD)
  popd
fi

GOPATH=$PWD/go
mkdir -p go/bin
GOBIN=$GOPATH/bin

time go get -u istio.io/test-infra/toolbox/githubctl

# this setting is required by githubctl, which runs git commands
git config --global user.name "TestRunnerBot"
git config --global user.email "testrunner@istio.io"

"$GOBIN/githubctl" \
    --token_file="$GITHUB_TOKEN_FILE" \
    --op=relPipelineBuild \
    --tag="$CB_VERSION" \
    --base_branch="$CB_BRANCH" \
    --ref_sha="$CB_COMMIT" \
    --pipeline="$CB_PIPELINE_TYPE"

echo build triggered


Ensure it works with new and existing containers

Cleaning the config files from the root path was causing breakages on
subsequent runs of the same container.

I have also removed the composer auth code for now for brevity  I will
put it back once we have the CI environment running if it is needed.
Examples can be found it most TP WP repos.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ministryofjustice/mojintranet-theme.git/'


Add a script to run clang tidy checks over the entire Envision code base

error: pathspec 'misc/cpp-support/run-clang-tidy.sh' did not match any file(s) known to git


CAS startup and shutdown

CAS startup and shutdown

cas_url='http://localhost:8080/cas-server-webapp-3.3.5/login'
alias casup="$PROJECTS/cas/tomcat/bin/startup.sh & open $cas_url"
alias casdown="$PROJECTS/cas/tomcat/bin/shutdown.sh"

error: pathspec 'cas/aliases.zsh' did not match any file(s) known to git


Added RabbitMQ fix script

Added RabbitMQ fix script

#!/bin/bash

# remember to stop and remove these containers by hand first

docker run --detach --name rabbitmq-data --volume /var/lib/rabbitmq busybox
docker run --detach --name rabbitmq --hostname rabbitmq --publish 5672:5672 --publish 15672:15672 --volumes-from rabbitmq-data --restart always rabbitmq

error: pathspec 'fix-rabbitmq.sh' did not match any file(s) known to git


Add Gitup to cask installations.

Add Gitup to cask installations.

fatal: remote error: upload-pack: not our ref dff04c6aa35dcac0abf3beedd17bc529fb19cfa6
fatal: the remote end hung up unexpectedly


[deps] Add a utility to automate the build of the SockJS client

#!/usr/bin/env bash

set -e

CURRENTDIR=$(pwd)
DESTDIR=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)
TEMPDIR=$(mktemp -d 2> /dev/null || mktemp -d -t 'tmp')

cleanup () {
  cd $CURRENTDIR
  [ -d $TEMPDIR ] && rm -rf $TEMPDIR
}

trap cleanup INT TERM EXIT

git clone https://github.com/sockjs/sockjs-client.git $TEMPDIR
cd $TEMPDIR
git checkout $(git describe --tags --abbrev=0)
NODE_ENV=development npm install
make sockjs.js
mv sockjs.js $DESTDIR/library.js

error: pathspec 'transformers/sockjs/update.sh' did not match any file(s) known to git


move message

move message

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/andrewsalveson/CaptainHook.git/'


Added format-patch.sh. This script is to be used as a replacement of "git format-patch" with similar arguments for submitting patches to the GlusterFS project

#!/bin/bash

function is_num()
{
    local num;

    num="$1";

    [ -z "$(echo $num | sed -e 's/[0-9]//g')" ]
}

function guess_branch()
{
    local branch;
    local src_branch;

    branch=$(git branch | grep '*' | cut -f2 -d' ');

    if [ $branch = "master" ] ; then
        src_branch="master";
    else
        src_branch=$(cat .git/logs/refs/heads/$branch | head -n 1 \
            | sed -r -e 's/.*( [^ ]*)$/\1/g' | cut -f2 -d/);
    fi

    echo $src_branch
}

function main()
{
    local branch;
    local bug;

    branch=$(guess_branch);
    echo
    echo "Patches are always to be associated with a bug ID. If there is no   "
    echo "bug filed in bugzilla for this patch, it is highly suggested to file"
    echo "a new bug with a description and reasoning of this patchset. If this"
    echo "is a new feature, then file a new enhancement bug with a brief      "
    echo "summary of the feature as the description."
    echo
    echo -n "Enter bug ID (from http://bugs.gluster.com/): "
    read bug;

    [ -z "$bug" ] || is_num $bug || {
        log "bug ID should be a valid bug number";
        exit;
    }

    if [ -z "$bug" ]; then
        git format-patch --subject-prefix="PATCH BRANCH:$branch" "$@";
    else
        git format-patch --subject-prefix="PATCH BRANCH:$branch BUG:$bug" "$@";
    fi
}

main "$@"

error: pathspec 'format-patch.sh' did not match any file(s) known to git


fix add script

fix add script

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tferi/vitrin-bash.git/'


MNT: Add update_changes script

MNT: Add update_changes script

#!/bin/bash
#
# Collects the pull-requests since the latest release and
# aranges them in the CHANGES.rst.txt file.
#
# This is a script to be run before releasing a new version.
#
# Usage /bin/bash update_changes.sh 1.0.1
#

# Setting      # $ help set
set -u         # Treat unset variables as an error when substituting.
set -x         # Print command traces before executing command.

# Check whether the Upcoming release header is present
head -1 CHANGES.rst | grep -q Upcoming
UPCOMING=$?
if [[ "$UPCOMING" == "0" ]]; then
    head -n3  CHANGES.rst >> newchanges
fi

# Elaborate today's release header
HEADER="$1 ($(date '+%B %d, %Y'))"
echo $HEADER >> newchanges
echo $( printf "%${#HEADER}s" | tr " " "=" ) >> newchanges
echo "" >> newchanges

# Search for PRs since previous release
git log --grep="Merge pull request" `git describe --tags --abbrev=0`..HEAD --pretty='format:  * %b %s' | sed  's/Merge pull request \#\([^\d]*\)\ from\ .*/(\#\1)/' >> newchanges
echo "" >> newchanges
echo "" >> newchanges

# Add back the Upcoming header if it was present
if [[ "$UPCOMING" == "0" ]]; then
    tail -n+4 CHANGES.rst >> newchanges
else
    cat CHANGES.rst >> newchanges
fi

# Replace old CHANGES.rst with new file
mv newchanges CHANGES.rst

error: pathspec 'tools/update_changes.sh' did not match any file(s) known to git


added a script to generate a html table from the symbol documentation

#!/bin/bash

input=$1

g1="POS Nominal Verbal"

print_sym_html()
{
    file=symbols/$1
    sym=$1
    dsc=`head -1 $file`
    wp=`grep ^WP: $file |cut -d: -f2-`
    notes=`grep ^NOTE: $file |cut -d: -f2-`
    exmpl=`grep ^EX: $file |cut -d: -f2-`

    echo "
$sym"
    if [[ -n "$wp" ]]; then
        echo "    $dsc"
    else
        echo "    $dsc"
    fi
    if [[ -n "$exmpl" ]]; then
        if [[ -n "$notes" ]]; then
            echo "    $notes
$exmpl"
        else
            echo "    $exmpl"
        fi
    else
        if [[ -n "$notes" ]]; then
            echo "    $notes"
        else
            echo "     "
        fi
    fi
}

print_head_html()
{
    gr=$1
    level=$2
    dsc=`grep ^$gr: symbol_groups |cut -d: -f2`
    wp=`grep ^$gr: symbol_groups |cut -d: -f3`
    echo "
"
    if [[ -n "$wp" ]]; then
        echo "    $dsc"
    else
        echo "    $dsc"
    fi
}

for g in $g1; do
    g2=`cut -d: -f1 symbol_groups |grep ^${g}/`
    syms=`grep -l ^Type:$g'$' symbols/* |sed 's/^symbols\///'`
    print_head_html $g 2
    if [ -n "$syms" ]; then
        for s in $syms; do
            print_sym_html $s
        done
    fi
    for gg in $g2; do
        print_head_html $gg 3
        syms=`grep -l ^Type:$gg'$' symbols/* |sed 's/^symbols\///'`
            for s in $syms; do
                print_sym_html $s
            done
    done
done

exit

IFS='
'
for line in `cat $input`;do

    if echo "$line" |grep  '^%--' >/dev/null 2>&1 ; then
        w=`echo "$line"  |cut -c4- | cut -d\| -f1 `
        wp=`echo "$line" |cut -c4- | cut -d\| -sf2 `
        echo '
'
        if [[ -n "$wp" ]]; then
            echo "    $w"
        else
            echo "    $w"
        fi
    elif echo "$line" | grep  '^%-' >/dev/null 2>&1; then
        w=`echo "$line"  |cut -c3- | cut -d\| -f1 `
        wp=`echo "$line" |cut -c3- | cut -d\| -sf2 `
        echo '
'
        if [[ -n "$wp" ]]; then
            echo "    $w"
        else
            echo "    $w"
        fi
    elif echo "$line" | grep  '^<' >/dev/null 2>&1 ;then
        sym=`echo "$line" | sed 's/^<\([^>]*\)>.*/\1/'`
        gls=`echo "$line" | cut -d- -f2`
        exp=`echo "$line" | grep '\--' | sed 's/.*--\(.*\)/\1/'`
        wp=`echo "$gls" |cut -c2- | cut -d\| -sf2 `
        gls=`echo "$gls"  |cut -c2- | cut -d\| -f1 `

        echo "
$sym"
        if [[ -n "$wp" ]]; then
            echo "    $gls"
        else
            echo "    $gls"
        fi
        if [[ -n "$exp" ]]; then
            echo "    $exp"
        else
            echo "     "
        fi

    else
        continue;
    fi
done

error: pathspec 'doc/syms-doc.sh' did not match any file(s) known to git