#!/bin/bash

for dir in */
do
  base=$(basename "$dir")
  rar a "${base}" "$dir"
done
