add "position to the command line argurments and environment variables
This commit is contained in:
parent
81879cf9ed
commit
eacde3a340
7
kunst
7
kunst
|
@ -32,7 +32,7 @@ show_help() {
|
|||
|
||||
|
||||
# Parse the arguments
|
||||
options=$(getopt -o h --long size:,music_dir:,version,silent,help -- "$@")
|
||||
options=$(getopt -o h --long position:,size:,music_dir:,version,silent,help -- "$@")
|
||||
eval set -- "$options"
|
||||
|
||||
while true; do
|
||||
|
@ -41,6 +41,10 @@ while true; do
|
|||
shift;
|
||||
SIZE=$1
|
||||
;;
|
||||
--position)
|
||||
shift;
|
||||
POSITION=$1
|
||||
;;
|
||||
--music_dir)
|
||||
shift;
|
||||
MUSIC_DIR=$1
|
||||
|
@ -183,6 +187,7 @@ main() {
|
|||
|
||||
[[ $KUNST_MUSIC_DIR != "" ]] && MUSIC_DIR=$KUNST_MUSIC_DIR
|
||||
[[ $KUNST_SIZE != "" ]] && SIZE=$KUNST_SIZE
|
||||
[[ $KUNST_POSITION != "" ]] && POSITION=$KUNST_POSITION
|
||||
|
||||
# Flag to run some commands only once in the loop
|
||||
FIRST_RUN=true
|
||||
|
|
Loading…
Reference in New Issue