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)/..
|
export QP_ROOT=$(dirname $0)/..
|
||||||
|
|
||||||
|
python2 ${QP_ROOT}/scripts/hello.py
|
||||||
|
echo ""
|
||||||
|
echo " -- Quantum Package Shell -- "
|
||||||
|
echo ""
|
||||||
|
|
||||||
exec bash --init-file <(cat << EOF
|
exec bash --init-file <(cat << EOF
|
||||||
[[ -f \${HOME}/.bashrc ]] && source \${HOME}/.bashrc
|
[[ -f \${HOME}/.bashrc ]] && source \${HOME}/.bashrc
|
||||||
source \${QP_ROOT}/quantum_package.rc
|
source \${QP_ROOT}/quantum_package.rc
|
||||||
|
35
configure
vendored
35
configure
vendored
@ -21,10 +21,12 @@ Usage:
|
|||||||
$(basename $0) -i <package> | --install=<package>
|
$(basename $0) -i <package> | --install=<package>
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-c, --config=<file> Define a configuration file, in "${QP_ROOT}/config/".
|
-c, --config=<file> Define a COMPILATION configuration file,
|
||||||
-h, --help Print the help message
|
in "${QP_ROOT}/config/".
|
||||||
-i, --install=<package> Install <package>. Use at your own risk:
|
-h, --help Print the HELP message
|
||||||
no support will be provided for the installation of dependencies.
|
-i, --install=<package> INSTALL <package>. Use at your OWN RISK:
|
||||||
|
no support will be provided for the installation of
|
||||||
|
dependencies.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
./$(basename $0) -c config/gfortran.cfg
|
./$(basename $0) -c config/gfortran.cfg
|
||||||
@ -68,7 +70,7 @@ while true : ; do
|
|||||||
*) if [[ -f $2 ]] ; then
|
*) if [[ -f $2 ]] ; then
|
||||||
CONFIG="$2"
|
CONFIG="$2"
|
||||||
else
|
else
|
||||||
error "error: configuration file not accessible"
|
error "error: configuration file $2 not found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
@ -414,6 +416,7 @@ if [[ ${RESULTSFILE} = $(not_found) ]] ; then
|
|||||||
fail
|
fail
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\e[0;34m"
|
||||||
echo " ___________________________ "
|
echo " ___________________________ "
|
||||||
echo "< All dependencies installed. >"
|
echo "< All dependencies installed. >"
|
||||||
echo " --------------------------- "
|
echo " --------------------------- "
|
||||||
@ -423,16 +426,7 @@ echo " (__)\ )\/\. "
|
|||||||
echo " ||----w | "
|
echo " ||----w | "
|
||||||
echo " || || "
|
echo " || || "
|
||||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||||
echo ""
|
printf "\e[m\n"
|
||||||
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 ""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -n $CONFIG ]] ; then
|
if [[ -n $CONFIG ]] ; then
|
||||||
@ -440,5 +434,16 @@ if [[ -n $CONFIG ]] ; then
|
|||||||
"${QP_ROOT}"/scripts/compilation/qp_create_ninja create --development "${CONFIG}"
|
"${QP_ROOT}"/scripts/compilation/qp_create_ninja create --development "${CONFIG}"
|
||||||
fi
|
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
|
# Configuration for the Ninja package
|
||||||
|
|
||||||
export NINJA=${QP_ROOT}/bin/ninja
|
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