#!/bin/bash if [ -z "$1" ] || [ -z "$2" ]; then echo "No name supplied!" exit fi project_name="$1" feature_name="$2" # {{{ =============================> # Remove from Data layer dir="../$project_name/Data" rm -f $dir/Models/$feature_name.cs sed -i "/$feature_name/d" $dir/${project_name}Context.cs # }}} =============================< # {{{ =============================> # Remove from Service layer dir="../$project_name/Services" rm -f $dir/Configurations/Service${feature_name}Mappings.cs rm -rf $dir/Models/$feature_name rm -f $dir/${feature_name}Service.cs # }}} =============================< # {{{ =============================> # Remove from Web layer dir="../$project_name/Web" rm -f $dir/Configurations/Controller${feature_name}Mappings.cs rm -f $dir/Controllers/${feature_name}Controller.cs rm -rf $dir/Models/$feature_name rm -rf $dir/Views/$feature_name sed -i "/$feature_name/d" $dir/Views/_ViewImports.cshtml sed -i "/$feature_name/d" $dir/Startup.cs