sequencer - don't create any config if only profiles should be listed
This commit is contained in:
@@ -487,7 +487,7 @@ listProfiles() {
|
||||
return 1
|
||||
fi
|
||||
[[ "$1" == "-q" ]] && return 0
|
||||
for file in $(ls "$SEQ_CONFIG_HOME"); do
|
||||
for file in $(ls "$SEQ_CONFIG_HOME" 2>/dev/null); do
|
||||
[[ ${file%.*} =~ ^${1:-".*"} ]] && profiles+=(${file%.*})
|
||||
done
|
||||
printf '%s\n' "${profiles[*]}"
|
||||
@@ -538,10 +538,10 @@ initSeqConfig() {
|
||||
local configDir="$(dirname $configLoc)"
|
||||
local configTemplate="$2"
|
||||
|
||||
# Create config subdir in users home
|
||||
if [ ! -e "$configDir/" ] ; then
|
||||
echoseq -n " [I] Creating $(realpath $configDir)..."
|
||||
exe install -m 700 -d "$configDir" && echoseq "Ok" || echoseq "Nok"
|
||||
# Don't create anything if only profiles should be listed
|
||||
if [ -n "${SEQ_PROFILE_LIST}" ] ; then
|
||||
SEQ_CONFIG_HOME="$configDir"
|
||||
return 0
|
||||
fi
|
||||
|
||||
SEQ_CONFIG_HOME="$configDir"
|
||||
@@ -565,6 +565,12 @@ initSeqConfig() {
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Create config subdir in users home
|
||||
if [ ! -e "$configDir/" ] ; then
|
||||
echoseq -n " [I] Creating $(realpath $configDir)..."
|
||||
exe install -m 700 -d "$configDir" && echoseq "Ok" || echoseq "Nok"
|
||||
fi
|
||||
|
||||
# Config does not exist, check for template
|
||||
if [ -s "$configTemplate" ] ; then
|
||||
|
Reference in New Issue
Block a user