mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-27 04:59:29 +08:00
Delete new line when iter
This commit is contained in:
@@ -60,13 +60,10 @@ ensure_apt_sourcelist (int debian_type)
|
||||
chsrc_note2 (msg);
|
||||
}
|
||||
|
||||
// 反向引用需要escape一下
|
||||
/* 反向引用需要escape */
|
||||
char *codename = xy_run ("sed -nr 's/VERSION_CODENAME=(.*)/\\1/p' " ETC_OS_RELEASE, 0);
|
||||
codename = xy_str_delete_suffix (codename, "\n");
|
||||
|
||||
char *version_id = xy_run ("sed -nr 's/VERSION_ID=\"(.*)\"/\\1/p' " ETC_OS_RELEASE, 0);
|
||||
version_id = xy_str_delete_suffix (codename, "\n");
|
||||
|
||||
|
||||
double version = atof (version_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user