mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: don't create default config and autostart file in HOME path
This commit is contained in:
parent
9030579b18
commit
b7c32a0223
2 changed files with 23 additions and 23 deletions
|
|
@ -95,7 +95,7 @@ like `MAOMAOCONFIG=/home/xxx/maomao`
|
|||
|
||||
- the default autostart path is `~/.config/maomao/autostart.sh`
|
||||
|
||||
- the fallback config path is in /etc/maomao/config.conf
|
||||
- the fallback config path is in `/etc/maomao/config.conf`, you can find the default config here
|
||||
|
||||
|
||||
# my dotfile
|
||||
|
|
|
|||
44
meson.build
44
meson.build
|
|
@ -4,28 +4,28 @@ project('maomao', ['c', 'cpp'],
|
|||
|
||||
subdir('protocols')
|
||||
|
||||
fs = import('fs')
|
||||
|
||||
# 获取用户的主目录
|
||||
home_dir = run_command('sh', '-c', 'echo $HOME', check: true).stdout().strip()
|
||||
config_dir = join_paths(home_dir, '.config', 'maomao')
|
||||
|
||||
# 如果目标目录不存在,则创建它
|
||||
if not fs.is_dir(config_dir)
|
||||
run_command('mkdir', '-p', config_dir, check: true)
|
||||
endif
|
||||
|
||||
# 拷贝 config.conf
|
||||
config_file = join_paths(config_dir, 'config.conf')
|
||||
if not fs.exists(config_file)
|
||||
run_command('cp', 'config.conf', config_file, check: true)
|
||||
endif
|
||||
|
||||
# 拷贝 autostart.sh
|
||||
autostart_file = join_paths(config_dir, 'autostart.sh')
|
||||
if not fs.exists(autostart_file)
|
||||
run_command('cp', 'autostart.sh', autostart_file, check: true)
|
||||
endif
|
||||
# fs = import('fs')
|
||||
#
|
||||
# # 获取用户的主目录
|
||||
# home_dir = run_command('sh', '-c', 'echo $HOME', check: true).stdout().strip()
|
||||
# config_dir = join_paths(home_dir, '.config', 'maomao')
|
||||
#
|
||||
# # 如果目标目录不存在,则创建它
|
||||
# if not fs.is_dir(config_dir)
|
||||
# run_command('mkdir', '-p', config_dir, check: true)
|
||||
# endif
|
||||
#
|
||||
# # 拷贝 config.conf
|
||||
# config_file = join_paths(config_dir, 'config.conf')
|
||||
# if not fs.exists(config_file)
|
||||
# run_command('cp', 'config.conf', config_file, check: true)
|
||||
# endif
|
||||
#
|
||||
# # 拷贝 autostart.sh
|
||||
# autostart_file = join_paths(config_dir, 'autostart.sh')
|
||||
# if not fs.exists(autostart_file)
|
||||
# run_command('cp', 'autostart.sh', autostart_file, check: true)
|
||||
# endif
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
libm = cc.find_library('m')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue