Merge branch 'master' into 'main'
Master See merge request cedricAbonnel/scripts-bash!1
This commit is contained in:
commit
68c2fc7e38
|
@ -1,11 +1,30 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
path_files=/home/cedric24c/Musique/non_stop_music
|
## Read config file
|
||||||
files=($path_files/*)
|
config_filename=~/.config/$(basename ${0})
|
||||||
|
test -f ${config_filename} && . ${config_filename} || config_file_create=1
|
||||||
|
|
||||||
|
### Check directory music background
|
||||||
|
if [[ -z "${path_music_file}+set" ]]; then
|
||||||
|
path_music_files=$(xdg-user-dir MUSIC)
|
||||||
|
fi
|
||||||
|
if [[ -z "${path_music_file}+set" ]]; then
|
||||||
|
path_music_files=${USER}
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Write config file
|
||||||
|
if [ config_file_create -eq 1 ]; then
|
||||||
|
echo "# Fichier de configuration créé $(date +%c)" | tee ${config_filename}
|
||||||
|
echo "path_music_files=${path_music_files}" | tee ${config_filename}
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Init var
|
||||||
|
files=($path_music_files/*)
|
||||||
volume=0.06
|
volume=0.06
|
||||||
|
|
||||||
|
## execute
|
||||||
echo Process number $$
|
echo Process number $$
|
||||||
echo Path files : $path_files
|
echo Path files : $path_music_files
|
||||||
echo Number of files in the path : ${#files[@]}
|
echo Number of files in the path : ${#files[@]}
|
||||||
|
|
||||||
while [ 1 ];do
|
while [ 1 ];do
|
||||||
|
|
Loading…
Reference in New Issue