mirror of
https://github.com/LCPQ/quantum_package
synced 2024-10-19 22:41:48 +02:00
commit
0655723285
5
bin/qpsh
5
bin/qpsh
@ -2,6 +2,11 @@
|
||||
|
||||
export QP_ROOT=$(dirname $0)/..
|
||||
|
||||
python2 ${QP_ROOT}/scripts/hello.py
|
||||
echo ""
|
||||
echo " -- Quantum Package Shell -- "
|
||||
echo ""
|
||||
|
||||
exec bash --init-file <(cat << EOF
|
||||
[[ -f \${HOME}/.bashrc ]] && source \${HOME}/.bashrc
|
||||
source \${QP_ROOT}/quantum_package.rc
|
||||
|
37
configure
vendored
37
configure
vendored
@ -21,10 +21,12 @@ Usage:
|
||||
$(basename $0) -i <package> | --install=<package>
|
||||
|
||||
Options:
|
||||
-c, --config=<file> Define a configuration file, in "${QP_ROOT}/config/".
|
||||
-h, --help Print the help message
|
||||
-i, --install=<package> Install <package>. Use at your own risk:
|
||||
no support will be provided for the installation of dependencies.
|
||||
-c, --config=<file> Define a COMPILATION configuration file,
|
||||
in "${QP_ROOT}/config/".
|
||||
-h, --help Print the HELP message
|
||||
-i, --install=<package> INSTALL <package>. Use at your OWN RISK:
|
||||
no support will be provided for the installation of
|
||||
dependencies.
|
||||
|
||||
Example:
|
||||
./$(basename $0) -c config/gfortran.cfg
|
||||
@ -68,7 +70,7 @@ while true : ; do
|
||||
*) if [[ -f $2 ]] ; then
|
||||
CONFIG="$2"
|
||||
else
|
||||
error "error: configuration file not accessible"
|
||||
error "error: configuration file $2 not found."
|
||||
exit 1
|
||||
fi
|
||||
esac
|
||||
@ -414,6 +416,7 @@ if [[ ${RESULTSFILE} = $(not_found) ]] ; then
|
||||
fail
|
||||
fi
|
||||
|
||||
printf "\e[0;34m"
|
||||
echo " ___________________________ "
|
||||
echo "< All dependencies installed. >"
|
||||
echo " --------------------------- "
|
||||
@ -423,22 +426,24 @@ echo " (__)\ )\/\. "
|
||||
echo " ||----w | "
|
||||
echo " || || "
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo ""
|
||||
echo "Now, if you want to use the current shell,"
|
||||
echo ""
|
||||
echo " source $QP_ROOT/quantum_package.rc"
|
||||
echo ""
|
||||
echo "Or if you want to use a Bash shell adapted for QP:"
|
||||
echo ""
|
||||
echo " $QP_ROOT/qpsh"
|
||||
echo ""
|
||||
|
||||
|
||||
printf "\e[m\n"
|
||||
|
||||
|
||||
if [[ -n $CONFIG ]] ; then
|
||||
|
||||
"${QP_ROOT}"/scripts/compilation/qp_create_ninja create --development "${CONFIG}"
|
||||
fi
|
||||
|
||||
if [[ -f ${QP_ROOT}/build.ninja ]] ; then
|
||||
exec ${QP_ROOT}/bin/qpsh
|
||||
else
|
||||
echo ""
|
||||
echo "${QP_ROOT}/build.ninja does not exist,"
|
||||
echo "you need to specify the COMPILATION configuration file."
|
||||
echo "See ./configure --help for more details."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
10
etc/ninja.rc
10
etc/ninja.rc
@ -1,3 +1,13 @@
|
||||
# Configuration for the Ninja package
|
||||
|
||||
export NINJA=${QP_ROOT}/bin/ninja
|
||||
|
||||
function ninja () {
|
||||
if [[ -f ${QP_ROOT}/build.ninja ]] ; then
|
||||
exec ninja "$@"
|
||||
else
|
||||
>&2 echo "Error: build.ninja does not exists.
|
||||
You need to run ./configure first."
|
||||
fi
|
||||
|
||||
}
|
||||
|
140
scripts/hello.py
Normal file
140
scripts/hello.py
Normal file
@ -0,0 +1,140 @@
|
||||
#!/usr/bin/env python2
|
||||
|
||||
import random
|
||||
|
||||
def main():
|
||||
hello = [ """
|
||||
)
|
||||
( ( /(
|
||||
( )\ ` ) ( )\())
|
||||
)(( ) /(/( )\ ((_)\
|
||||
((_)_)((_)_\ ((_)| |(_)
|
||||
/ _` || '_ \)(_-<| ' \
|
||||
\__, || .__/ /__/|_||_|
|
||||
|_||_|
|
||||
""", """
|
||||
.x+=:.
|
||||
z` ^% .uef^"
|
||||
.d`` . <k :d88E
|
||||
.u@u @8Ne. .u .@8Ned8" `888E
|
||||
.zWF8888bx %8888:u@88N .@^%8888" 888E .z8k
|
||||
.888 9888 `888I 888. x88: `)8b. 888E~?888L
|
||||
I888 9888 888I 888I 8888N=*8888 888E 888E
|
||||
I888 9888 888I 888I %8" R88 888E 888E
|
||||
I888 9888 uW888L 888' @8Wou 9% 888E 888E
|
||||
`888Nx?888 '*88888Nu88P .888888P` 888E 888E
|
||||
"88" '888 ~ '88888F` ` ^"F m888N= 888>
|
||||
88E 888 ^ `Y" 888
|
||||
98> *8E J88"
|
||||
'8 '8> @%
|
||||
` "
|
||||
""", """
|
||||
|
||||
@@@@@@ @@@@@@@ @@@@@@ @@@ @@@
|
||||
@@@@@@@@ @@@@@@@@ @@@@@@@ @@@ @@@
|
||||
@@! @@@ @@! @@@ !@@ @@! @@@
|
||||
!@! @!@ !@! @!@ !@! !@! @!@
|
||||
@!@ !@! @!@@!@! !!@@!! @!@!@!@!
|
||||
!@! !!! !!@!!! !!@!!! !!!@!!!!
|
||||
!!:!!:!: !!: !:! !!: !!!
|
||||
:!: :!: :!: !:! :!: !:!
|
||||
::::: :! :: :::: :: :: :::
|
||||
: : ::: : :: : : : : :
|
||||
|
||||
""", """
|
||||
|
||||
,-----. .-------. .-'''-. .---. .---.
|
||||
.' .-, '. \ _(`)_ \ / _ \| | |_ _|
|
||||
/ ,-.| \ _ \ | (_ o._)| (`' )/`--'| | ( ' )
|
||||
; \ '_ / | : | (_,_) /(_ o _). | '-(_{;}_)
|
||||
| _`,/ \ _/ | | '-.-' (_,_). '. | (_,_)
|
||||
: ( '\_/ \ ; | | .---. \ :| _ _--. |
|
||||
\ `"/ \ ) \ | | \ `-' ||( ' ) | |
|
||||
'. \_/``"/) )/ ) \ / (_{;}_)| |
|
||||
'-----' `-' `---' `-...-' '(_,_) '---'
|
||||
|
||||
""", r"""
|
||||
___ ___ ___
|
||||
___ / /\ / /\ /__/\
|
||||
/ /\ / /::\ / /:/_ \ \:\
|
||||
/ /::\ / /:/\:\ / /:/ /\ \__\:\
|
||||
/ /:/\:\ / /:/~/:// /:/ /::\ ___ / /::\
|
||||
/ /:/~/::\ /__/:/ /://__/:/ /:/\:\/__/\ /:/\:\
|
||||
/__/:/ /:/\:\\ \:\/:/ \ \:\/:/~/:/\ \:\/:/__\/
|
||||
\ \:\/:/__\/ \ \::/ \ \::/ /:/ \ \::/
|
||||
\ \::/ \ \:\ \__\/ /:/ \ \:\
|
||||
\__\/ \ \:\ /__/:/ \ \:\
|
||||
\__\/ \__\/ \__\/
|
||||
|
||||
""", r"""
|
||||
|
||||
______ _____ ______ ____ ____
|
||||
___|\ \ ___|\ \ ___|\ \ | | | |
|
||||
/ /\ \ | |\ \ | |\ \| | | |
|
||||
/ / | || | | | | |/____/|| |_| |
|
||||
| | | || |/____/| ___| \| | || .-. |
|
||||
|\ \ |__ || || ||| \ \___|/ | | | |
|
||||
| \ \\` \ /|| ||____|/| |\ \ | | | |
|
||||
\ \ ___\\ \ ||____| |\ ___\|_____| |____| |____|
|
||||
\ | ||___|/| | | | | | | | | |
|
||||
\|____|| | |____| \|____|_____| |____| |____|
|
||||
\( |___| \( \( )/ \( )/
|
||||
' )/ ' ' ' ' '
|
||||
'
|
||||
""", r"""
|
||||
|
||||
______________________________________________/\\\_________
|
||||
_____________________________________________\/\\\_________
|
||||
___/\\\\\\\\______/\\\\\\\\\_________________\/\\\_________
|
||||
__/\\\////\\\____/\\\/////\\\___/\\\\\\\\\\__\/\\\_________
|
||||
_\//\\\\\\\\\___\/\\\\\\\\\\___\/\\\//////___\/\\\\\\\\\\__
|
||||
__\///////\\\___\/\\\//////____\/\\\\\\\\\\__\/\\\/////\\\_
|
||||
________\/\\\___\/\\\__________\////////\\\__\/\\\___\/\\\_
|
||||
________\/\\\\__\/\\\___________/\\\\\\\\\\__\/\\\___\/\\\_
|
||||
________\////___\///___________\//////////___\///____\///__
|
||||
|
||||
""".replace(r"\\","\033[0;34m\\\\\033[m"), """
|
||||
_ _ _ _ _ _ _ _
|
||||
(c).-.(c) (c).-.(c) (c).-.(c) (c).-.(c)
|
||||
/ ._. \ / ._. \ / ._. \ / ._. \
|
||||
__\( Y )/__ __\( Y )/__ __\( Y )/__ __\( Y )/__
|
||||
(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)
|
||||
|| \033[0;32mQ\033[m || || \033[0;32mP\033[m || || \033[0;32mS\033[m || || \033[0;32mH\033[m ||
|
||||
_.' `-' '._ _.' `-' '._ _.' `-' '._ _.' `-' '._
|
||||
(.-./`-'\.-.)(.-./`-'\.-.)(.-./`-`\.-.)(.-./`-'\.-.)
|
||||
`-' `-' `-' `-' `-' `-' `-' `-'
|
||||
|
||||
""".replace("Y","\033[0;31mY\033[m"), r"""
|
||||
|
||||
_ _ _ _
|
||||
__/\\___ _/\\___ /\\__ _/\\___
|
||||
(_ __)) (_ _ _)) / \\(_ __ __))
|
||||
/ _ \\ / |))\\ _\ \_// / |_| \\
|
||||
/:.(_)) \\_ /:. ___//// \:.\ /:. _ \\
|
||||
\ _______//\_ \\ \\__ / \___| | //
|
||||
\// \// \\/ \//
|
||||
|
||||
""", """
|
||||
_ _ _ _
|
||||
_( )__ _( )__ _( )__ _( )__
|
||||
_| _|_| _|_| _|_| _|
|
||||
(_ Q _ (_(_ P _ (_(_ S _ (_(_ H _ (_
|
||||
|_( )__| |_( )__| |_( )__| |_( )__|
|
||||
|
||||
""", r"""
|
||||
______
|
||||
______ _________ ___________ /_
|
||||
_ __ `/___ __ \__ ___/__ __ \
|
||||
/ /_/ / __ /_/ /_(__ ) _ / / /
|
||||
\__, / _ .___/ /____/ /_/ /_/
|
||||
/_/ /_/
|
||||
|
||||
""" ]
|
||||
|
||||
print random.choice(hello)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user