rename脚本
#!/bin/bash
if [ $# != 2 ]
then
echo "Uasge: $0 [old_name] [new_name]"
else
sed -i "s/$1/$2/g" `grep "$1" ./ -rlI --include=*{.c,.h,Makefile,insmod.sh,rmmod.sh}`
fi
Makefile
current_dir_name := $(notdir $(shell pwd))
TARGET := $(current_dir_name).elf
build.sh
#!/bin/bash
currentDir=${PWD}
echo "currentDir=" ${currentDir}
current_basedir=$(basename $currentDir)
echo "rm =" ${current_basedir}
ELFNAME=".elf"
ELFNAME=${current_basedir}${ELFNAME}
echo "ELFNAME=" ${ELFNAME}
if [ -e ${ELFNAME} ]; then
rm ${ELFNAME}
fi
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。