#更新 #GPL #年份 #许可证 #终端

app year_update

用于更新GPL-v3项目中许可证文件的日期

1个稳定版本

1.2.1 2024年6月23日
1.2.0 2024年2月25日
1.1.1 2024年1月29日
1.1.0 2024年1月11日
1.0.0 2024年1月8日

#499开发工具

每月 38 次下载

GPL-3.0 许可证

15KB
96

年度更新

#!/bin/bash

dir=$1
old_year=$2
new_year=$3

if [[ $# -ne 3 || ! -d $dir ]]; then
  echo "Usage: <dir> <old_year> <new_year>"
  exit 1
fi

files=$(find "$dir" -type f -name "*.rs")

for file in $files; do
  if [[ -f $file ]]; then
    sed -i "1,5s/$old_year/$new_year/g" "$file"
  fi
done

echo "Successful replace"
chmod +x year_update.sh
sudo mv year_update.sh /usr/local/bin/year_update

用法

Usage: <dir> <old_year> <new_year>

无运行时依赖